I’m new to java(C# before) and I do not understand how unmanaged resources are freed.
I create FloatBuffer like this FloatBuffer buffer = FloatBuffer.allocate(length);
How do I free it? There is not free, dispose or remove methods
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
All memory management in java is handled automatically (except in a few instances regarding interfacing with native code).
When there are no more references to your declared FloatBuffer, it will become eligible for garbage collection. Sometime thereafter, the garbage collector will run and deallocate its used memory.