#deleting objects
1 messages ยท Page 1 of 1 (latest)
<@&987246399047479336> please have a look, thanks.
Here is an AI assisted attempt to answer your question ๐ค. Maybe it helps! In any case, a human is on the way ๐. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.
No, in Java you do not have to manually "kill" objects like in C or C++. Java has automatic garbage collection which handles memory management for unused objects.
Useful links:
thats not a thing in java
java has a garbage collector
it automatically deletes any object that isnt used anymore
so you simply dont have to bother
@humble mesa if there is no pointer to an allocated block , garbage collector frees it, thats one of the major factor that makes java slower than C
also m not a mod here but please dont make multiple threads just ask all you want in one ๐
actually it is encouraged to make multiple threads
i think these questions can be termed under JAVA BASICS thats why I said so
since the person has been asking about java as a language, not the code itself.
welp, I am no expert , i may be completely wrong here.
Understand
it can also make it faster
cant really generalize it
yeah, well something for sure is that makes it a lot safer