my question is somewhat simple. All I want to know is, can you remove and instance of an object from the RAM in java? Like, when you type:
new Cat();
You don't assign a variable to that new cat, so you can't access it. This happens in games. It says something like, "new Pig();", and it creates an instance of the pig. But what happens when the pig dies? How is it deleted? Can it call its own method to erase itself?
Thanks.