#2317 Dangling Pointers and Memory Leak

adi5765 Mon 21 Jul 2014

Hello Everyone!

Does Fantom have the problems of Dangling Pointers or/and Memory Leak? I tried to check it, but i didn't find how to delete an object...

Thanks! :-)

SlimerDude Mon 21 Jul 2014

By default Fantom generates Java bytecode that runs on the Java Virtual Machine (JVM), so all the principles of Java also apply to Fantom.

Does Fantom have the problems of Dangling Pointers or/and Memory Leak?

So what you're actually asking is:

Does Java have problems with Dangling Pointers or/and Memory Leaks?

Given Java has around 9,000,000 developers I doubt it. But if you find any, be sure to report it to Oracle!

i didn't find how to delete an object

See this beginner's Java tutorial on using objects:

http://docs.oracle.com/javase/tutorial/java/javaOO/usingobject.html

Specifically see the The Garbage Collector section. Essentially, to drop an object reference, set it to null.

adi5765 Tue 22 Jul 2014

Thank u so much!!!!

lean Tue 22 Jul 2014

I search a little if Java has memory leak or/and dangling pointers, and the conclusion is that Java can have memory leak.. Here the link: http://stackoverflow.com/questions/6470651/creating-a-memory-leak-with-java

Login or Signup to reply.