Register | Login | |||||
Main
| Memberlist
| Active users
| Calendar
| Chat
| Online users Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album |
| |
0 users currently in Programming. |
Acmlm's Board - I3 Archive - Programming - Java Cleaning Up Memory... | New poll | | |
Add to favorites | Next newer thread | Next older thread |
User | Post | ||
DahrkDaiz Nipper Plant U wan hax Mario?! Since: 11-17-05 Last post: 6434 days Last view: 6433 days |
| ||
How would I go about freeing up resources manually rather than relying on the garbage collector to do so? Basically I have an array of objects, I want to randomize the list and I plan on doing so by creating another empty list and randomly placing elements in the previous list int he new one. However, I want to remove the old, unused list immediately rather than hoping the garbage collector gets it in a timely manner. Any tips? | |||
1337_Ac3 Shyguy Since: 04-22-06 From: sweden Last post: 6441 days Last view: 6433 days |
| ||
Delete listarray;
That is, if you used the new opperator when you created it. |
|||
DahrkDaiz Nipper Plant U wan hax Mario?! Since: 11-17-05 Last post: 6434 days Last view: 6433 days |
| ||
Ok well it's an array of objects, the objects were created with the new operator and the initial array was created with the new operator, does this method still apply? | |||
1337_Ac3 Shyguy Since: 04-22-06 From: sweden Last post: 6441 days Last view: 6433 days |
| ||
I think anything created with the new opperator can be deleted with the Delete opperator. | |||
neotransotaku Sledge Brother Liberated from school...until MLK day Since: 11-17-05 From: In Hearst Field Annex... Last post: 6434 days Last view: 6432 days |
| ||
I don't think Java as a delete operator. The closest thing you can get to running the garbage collector on demand is to call it via System.gc() | |||
1337_Ac3 Shyguy Since: 04-22-06 From: sweden Last post: 6441 days Last view: 6433 days |
| ||
Originally posted by neotransotaku You're right, java doesn't have a delete opperator... O_o That's pretty much utter fail, seeing as it's enough resource consuming at the moment. Let's hope someone gets it done now that java is open source... Or is the System.gc() you're talking about getting the work done? |
Add to favorites | Next newer thread | Next older thread |
Acmlm's Board - I3 Archive - Programming - Java Cleaning Up Memory... | | |