0

I am planning to write an Android chat application - in this application, one of the main features is user anonymity and security. The application will allow the user to upload pictures, and will also allow the user to write texts, which will be saved as Strings.

How can I ensure that these resources are completely destroyed by the Java system upon the destroy method being called? Obviously in C, since I have direct access to memory, I can write NULL values over all of the memory before calling free() in order to ensure complete deletion - but my understanding in Java is that this is impossible, and that I am supposed to just wait for the garbage collector to decide to delete resources.

Super Hacker
  • 124
  • 2
  • 3
  • 10
  • With respect to `Bitmap`, use `eraseColor()` or something to wipe out the current contents. – CommonsWare Oct 20 '15 at 23:18
  • besides CommonsWare's identifying your question as a duplicate, "onDestroy" is not always called, so your "security" measure, however implemented, may not succeed with this approach... – Jim Oct 21 '15 at 04:07

0 Answers0