destructor in Kotlin programming language : <p>I am new to Kotlin, have written a class in kotlin to perform database operation</p>

<p>I have defined database connection in constructor using init but I want to close database connection using destructor.</p>

<p>Any Idea of how to achieve this using kotlin destructor?</p>

<p>Currently I have wrote a separate function to close connection, which i want to have it using destructor like any other programming language like php,etc</p>
