Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
flluidmedia  
#1 Posted : Thursday, June 17, 2004 2:52:00 AM(UTC)
flluidmedia

Rank: Member

Groups: Member
Joined: 4/27/2004(UTC)
Posts: 40

How does aurigma handle garbage collection?

Under .NET anytime you use an unmanaged resource, like a handle or a file, you should call the Dispose() function to release the memory for the object. This help the GC but giving it less to do.

I was wonder why the BitmapClass object doesn't have a Dispose() method. Is it implemented privately and taken care of that way?

Thanks,

Brian

Fluid Media

Andrew  
#2 Posted : Thursday, June 17, 2004 2:28:00 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 876

Thanks: 2 times
Was thanked: 27 time(s) in 27 post(s)
BitmapClass is not written by us, it was generated by tlbimp utility. So it is not our fault that wrapper does not have a destructor method. :) I think the absence of this method was made with Microsoft by design. COM components has different cleaning mechanism and forcing destroying of the object may be unsafe if this component is used somewhere else.

So if you need to reduce memory load the only think you can do is to use Unload method to free raster data (the most heavy block of memory) and endure that all the rest object remains in memory. You also should try to avoid creating bitmaps more than it is necessary. For example do not create bitmap objects in loop. Instead of that create bitmap outside of loop and call LoadFromFile inside loop, etc.

Hope this helps.

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.