(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
05-03-24 07:55 AM
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: 6285 days
Last view: 6284 days
Posted on 01-28-07 03:15 AM Link | Quote
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: 6292 days
Last view: 6284 days
Posted on 01-28-07 03:41 AM Link | Quote
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: 6285 days
Last view: 6284 days
Posted on 01-28-07 03:42 AM Link | Quote
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: 6292 days
Last view: 6284 days
Posted on 01-28-07 03:58 PM Link | Quote
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: 6285 days
Last view: 6283 days
Posted on 01-28-07 07:36 PM Link | Quote
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: 6292 days
Last view: 6284 days
Posted on 01-30-07 09:03 PM Link | Quote
Originally posted by neotransotaku
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()

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... |


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.013 seconds; used 366.91 kB (max 442.22 kB)