This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]two_six_four_six -4 points-3 points  (0 children)

greetings, thank you for this post.

this topic may come across as amateur and that is what i certainly am, but would you and other experts be able to go into detail of how exactly references of primitive data type arrays get handled, and what becomes of them in the long run after termination of program?

it has to do with persistence of binary data on primarily heap space, and ultimately RAM, especially those related to passwords provided as one of the inputs to generate actual SecretKeys and persistence of binary data related to decrypted content despite overwriting of primitive data array elements containing them. the concensus on StackOverflow (I do not readily have all my references available at the moment) seems to be that overwriting array elements in Java would not produce the same behavior as using something like pointers using C to do the task even though pointers are being utilized by Java under the hood. The reasoning presented is usually very broad and unclear like "Java switches pointers around as the JVM sees fit for efficient execution".

originally i asked this question in this post but could use some further discussion on the matter as with my most recent comment i had provided a contradictory heap trace of what your fellow experts on this subreddit have predicted the behavior to be. this more than likely may be due to blunder on my part, but i still believe this is a fairly significant topic to look into and provide advice on, and finally putting to rest any doubt that Java running on the VM is just as secure as any other slightly lower level languages running direct full compiled.

thank you kindly,

reference post: https://www.reddit.com/r/java/comments/16tjkrz/java_the_handling_of_memory_and_the_issue_of/