Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
What Happens When Native Memory Space Pointed By java.nio.ByteBuffer Is Deleted
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Thomas Hawtin, post: 643488"] NIO itself does slightly better than a standard finaliser using sun.misc.Cleaner. (Phantom)References that extend Cleaner get executed from the ReferenceHandler thread, rather than queueing for a reference queue (such as the the finaliser queue). If there is a finaliser that references the buffer then, even with resurrection, the resource will not be cleared until there is no way at all to access it. If NIO can't allocate enough memory from a direct buffer, it will call System.gc to try to get others to finish reclamation. Tom Hawtin [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
What Happens When Native Memory Space Pointed By java.nio.ByteBuffer Is Deleted
Top