Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

How the Foxtrot can I release the Hashtable's associated resources?

 

I load 30 large bmps which will "eat" about 45MB of ram. Then, If I reload them, an aditional 45MB will be consumed. So, basicaly, If I reload these pictures 5 times more the 200MB will be consumed, even with the myHasTable.Clear() property and the CollectGarbage before reloading these images...

 

Also, the Hashtable don't have the "Dispose()" property... What the...

 

This Hastable of mine is static so I would only like to dispose it's associated resources rather then disposing the object itself...

Edited by EFileTahi-A
Posted

Hi PlausiblyDamp, tks once more for posting out.

 

The objects I am loading into the hastable are "Direct3D.Textures" which do not seem to have any disposing method... So, I have just runned out of ideias... and my project development is now frozen until I walkaround this thing...

 

Any further ideias will be too much apreciated

  • Administrators
Posted
If they don't have a dispose method then they probably do not need disposing ;) The only time an object needs to provide a Dispose method / have a dispose method called is if it has any unmanaged resources (windows handles, db connections etc.). If there are no unmanaged resources and the object doesn't provide a dispose method then just set them to null or let them fall out of scope and the GC will reclaim them when it sees fit.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

Texture.Dispose

 

Hi PlausiblyDamp, tks once more for posting out.

 

The objects I am loading into the hastable are "Direct3D.Textures" which do not seem to have any disposing method... So, I have just runned out of ideias... and my project development is now frozen until I walkaround this thing...

 

Any further ideias will be too much apreciated

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...