[ImageJ-devel] when to close cursors, was Re: [fiji-devel] imglib coding style

Stephan Saalfeld saalfeld at mpi-cbg.de
Thu Apr 15 07:28:24 CDT 2010


> > right now the Cursor.close() call is not necessary for any of the 
> > containers. But it will be when we start paging data and each Cursor 
> > will get a lock on the cell it currently works on. So when writing stuff 
> > using imglib one should think ahead and close cursors when they are not 
> > needed anymore.
> Fair enough. I might try my hand on some static code analyzer to point out 
> where a cursor needs to be closed.

As Steffi said, currently not at all, but for potentially paging
containers to come, always.  In any case, on deletion of the
container/image itself, the cursor-external references to the access
pages are gone.  That is, when you close the image/container, you do not
have to close the cursors working on it before nulling them.  Otherwise


More information about the ImageJ-devel mailing list