Closed GoogleCodeExporter closed 8 years ago
The close method of the Dataset instance should be used when you're done with
the file (this calls nc_close).
Original comment by whitaker.jeffrey@gmail.com
on 11 Sep 2012 at 5:48
Yes. I realise calling close() is the documented behaviour. But it would make
the API more "friendly" to support __del__ for a number of reasons:
- it would make it more similar to the built-in function "open()"
- it would reduce the number of things you need to remember to do
- it would rule out the ability to leave these dangling references - which can't be recovered and closed
Original comment by rhatters...@gmail.com
on 12 Sep 2012 at 4:48
Unfortunately, there's no way I know of to call nc_close from the C extension
when garbage collector runs. Adding a __del__ method doesn't do it. I'll keep
looking, but right now I don't see a way.
Original comment by whitaker.jeffrey@gmail.com
on 12 Sep 2012 at 11:33
I think I've figured out a way to do this - can you give svn trunk a try and
let me know if it works for you?
Original comment by whitaker.jeffrey@gmail.com
on 16 Sep 2012 at 7:30
Original comment by whitaker.jeffrey@gmail.com
on 12 Mar 2013 at 3:58
Original issue reported on code.google.com by
rhatters...@gmail.com
on 11 Sep 2012 at 1:48