When a classloader is garbage collected, are the classes loaded by it unloaded?
When the JVM is running is verbose mode, all the loaded classes are o/p. Similarly will the JVM log when it unloads a class?
I wrote a custom class loader to test this, but could not see any verbose log for unloading of the classes.
CustomClassLoader loader...
Can anybody tell me about Generation of Garbage Collector in .net ?
...
New to Cocoa and Objective-c.
Do I need getters and setters if I'm depending on garbage collection?
For example is it safe to just modify instance variables directly without the dot syntax?
And in the dealloc method can I sent them to nil instead of release (or do I even have to release them)?
...
I have this in my @interface
struct track currentTrack;
struct track previousTrack;
int anInt;
Since these are not objects, I do not have to have them like int* anInt right?
And if setting non-object values like ints, boolean, etc, I do not have to release the old value right (assuming non-GC environment)?
The struct contains objects...
If garbage collection is not required:
- (void) awakeFromNib{
//Create the NSStatusBar and set its length
statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength] retain];
...
Do I have to release that? And if I do, would that be in a finalize method or dealloc method?
If garbage collection is requ...
Let's say we have the following code in a class:
//class code
TextBox t = new TextBox();
ListBox l = new ListBox();
We have then two possible situations:
In the first, we declare qem1 as a class variable(or attribute, as they call it in the Java World):
//class variable
QuickEntryMediator qem1 = new QuickEntryMediator(t,l);
In the...
Silverlight does not provide perfmon counters for GC. How do i get GC Information?
Thanks
...
I'm trying to understand the internals of the CPython garbage collector, specifically when the destructor is called. So far, the behavior is intuitive, but the following case trips me up:
Disable the GC.
Create an object, then remove a reference to it.
The object is destroyed and the __del__ method is called.
I thought this would onl...
So I have a class that has the following member variables. I have get and set functions for every piece of data in this class.
public class NavigationMesh
{
public Vector3 node;
int weight;
bool isWall;
bool hasTreasure;
public NavigationMesh(int x, int y, int z, bool setWall, bool setTreasure)
{
//defau...
I have an instance of Tomcat 6.0.18 running on Sun's Java HotSpot(TM) Server VM build 1.6.0_14-b08. Is there any way for me to find out what garbage collection algorithm the JVM is using to run my web application?
...
I read that with .NET Framework 4 the current garbage collection implementation is replaced:
The .NET Framework 4 provides
background garbage collection. This
feature replaces concurrent garbage
collection in previous versions and
provides better performance.
At this page there is an explanation how it works but I am not su...
Suppose I have a weak reference to a car which has an ordinary reference to an engine. No other references to the car or the engine exist. Can the engine be garbage collected?
...
For memory optimization reasons, I'm launching myself the garbage collector during profiling, to check if objects are correctly cleaned after disposing of them.
The call to garbage collector is not enough, though, and it seems that there is no guarantee of what it will clean.
Is there a way to call it, to be sure it will recover as muc...
From another stackoverflow question, it seems that Android handles large bitmaps differently than other memory. It also seems like there is a way to force Android to recycle the bitmaps to free up memory. Can anyone enlighten me on how to do this.
My application uses 2-6 huge bitmaps at all times, so it nearly kills the phone's memory ...
I'm having some difficulty figuring out the best ways to pause and resume my application. Is there any comprehensive tutorial or something similar that would help me make sure that I'm not missing any important steps?
Mostly I'm just worried about not dealing with the memory being used by my application. There's a few apps I own that w...
As in question, I'd like to know best alternative for garbage collector, with it's pros and cons. My priority is speed, memory is less important - if there is gc which doesn't make any pause, let me know.
EDIT: maybe I should add, that I'm working on safe language, and garbage collecting or its alternative has to be used
...
I've read some docs about the .NET Garbage Collector but i still have some doubts (examples in C#):
1)Does GC.Collect() call a partial or a full collection?
2)Does a partial collection block the execution of the "victim" application? If yes.. then i suppose this is a very "light" things to do since i'm running a game server that uses 2-...
I want to create a background thread that's owned by an object. When that object is no longer needed, so is its background thread.
pseudo code of what I currently have:
ResetEvent _isCanceled
ResetEvent _hasWork
ThreadSafeQueue _workItems
Init()
new BackgroundThread(ThreadLoop).Start()
AddWork(work)
_workItems.Enqueue(work)
_ha...
I am developing a .NET Windows service that is creating a couple of threads and then uses these threads to send print jobs to printers (there is a thread for each printer). I have some issues which sometimes can be fixed by restarting the service. Some issues also arise when the service has been running for a while. This makes me suspect...
I have been building a game for a while (nearly done) - But the game needs a replay button and its a big task.
I know the GC is dreadful in flash, but I wanted to know if there is a way to wipe EVERYTHING as if the flash app has just begun. Clearing memory, game data - I haven't to worry about game loading as its not really heavy on dat...