RAM Leak

07/03/2009 05:52 Arcotemple:)#1
So how do i fix a RAM leak?
i never heard of it till recently
idk if i have a ram leak but i wanna be prepared in case i ever have one
07/03/2009 05:58 _tao4229_#2
C# won't let you have a memory `leak`
It's garbage collected, meaning anything that isn't being used (or alive) is dumped away.
Just don't allocate huge static byte[]s or load huge files into memory and you're pretty much taken care of by JIT/GC. (Or fuck up hard with pointers)
07/03/2009 12:15 _Emme_#3
#Moved
07/03/2009 17:37 high7#4
Quote:
Originally Posted by Arcotemple:) View Post
So how do i fix a RAM leak?
i never heard of it till recently
idk if i have a ram leak but i wanna be prepared in case i ever have one
Some more details would help us help you.

Quote:
Originally Posted by _tao4229_ View Post
C# won't let you have a memory `leak`
It's garbage collected, meaning anything that isn't being used (or alive) is dumped away.
Just don't allocate huge static byte[]s or load huge files into memory and you're pretty much taken care of by JIT/GC. (Or fuck up hard with pointers)
So much wrong with that.
07/04/2009 21:00 _tao4229_#5
Quote:
Originally Posted by high7 View Post
Some more details would help us help you.



So much wrong with that.
I'm talking in simplistic terms, you can't have a memory leak like you do in C++ or C, where you have memory not pointed to but still allocated, without using native functions.
07/05/2009 11:18 leavemealone#6
Basically in C# you don't have to release anything, Thats what tao is getting accross.
07/06/2009 01:07 high7#7
Ya you do, if you don't release event handlers then the object will never be freed...