[b][red]This message was edited by smashingpravin at 2006-12-14 5:41:35[/red][/b][hr] I m new to .Net want to know how memory management handled in assemblies
[b][red]This message was edited by DrMarten at 2006-12-14 14:9:7[/red][/b][hr] : I m new to .Net want to know how memory management handled in assemblies : : Thanks : : Pravin ______________________________________________________________________
Hi,
I guess it is all handled by the FRAMEWORK routines. Once a program is created in VB.Net or any other Visual Studio language then the memory is allocated as needed by your program with the Dim statements etc.
Memory is released when Sub's or/and when your program EXITS/ ENDS.
However for some programs/solutions/projects ( whatever you call them ), then you will see examples of the DISPOSE command which release resources back to the system for those objects/items it is called to act upon.
If your assemblies are all managed code than the garbage collection in .Net should take care deallocating objects itself. The garbage collection has three levels 0,1,2. Typically I have had no problems with managed code except some issues when creating delegates and timers on workers threads that needed to be removed before the references created would allow the memory to be released for the final stage of collection. Unmanaged code such as COM objects will still require to be released much of the time. here are some links.
Comments
: I m new to .Net want to know how memory management handled in assemblies
:
: Thanks
:
: Pravin
______________________________________________________________________
Hi,
I guess it is all handled by the FRAMEWORK routines.
Once a program is created in VB.Net or any other Visual Studio language then the memory is allocated as needed by your program with the Dim statements etc.
Memory is released when Sub's or/and when your program EXITS/ ENDS.
However for some programs/solutions/projects ( whatever you call them ), then you will see examples of the DISPOSE command which release resources back to the system for those objects/items it is called to act upon.
See this FORUM site.>> http://forums.microsoft.com/MSDN/default.aspx?ForumGroupID=10&SiteID=1
where a staff member of Microsoft or someone else may give you a definitive answer.
Memory managemennt is not something i'd
personally concern myself over. :-|
Regards,
Dr M.
~rlc
http://msdn.microsoft.com/msdnmag/issues/1100/gci/
http://msdn.microsoft.com/msdnmag/issues/1200/GCI2/
http://www.codeproject.com/dotnet/garbagecollection.asp