That's probably a good suggestion, but source review indicates that end() is called from finalize, so native resources are cleaned up when the object is garbage collected.