When an instance of my class is created, it should always be closed when the work is done.
public class MyClass {
@RememberToCall(function="#close()")
public MyClass() {
}
public void close() {
}
}
Similarly, SQLiteDatabasewhen executing an SQL query, you were reminded to call a function close()on the cursor object that returned. I want to do the same with my class, is there any annotation for this?
source
share