Reputation: 21
I want to delete agents that are occupying some resources. If I delete them with the function agent.deleteSelf, would the resources that are occupyed by them be released?
Upvotes: 1
Views: 94
Reputation: 12795
Yes. Same if you delete them with a Sink
or via the remove_MyAgentType(...)
calls.
Java is quite good at removing unused resources so typically no need to do garbage collection these days.
Keep you model tidy, destroy unused agents and you are good :)
Upvotes: 0