On custom objects, in the past i have actually obtained the GC id of
the object and saved as part of the object for the finalize method and
submitted the GC id to be immediately collected.

Problem with .Net in regards to this is that it has its own cycle of
freeing up memory.  Outside of forced collections, its about once
every 15 to 60 mins, pending on the load on the computer....but i
personally think its set to 30-45 mins with a 15 mins buffer on either
side.

Consider .Net code as managed code and thus does not need to have
memory management.  C++, classic, would be unmanaged code and would
need to have its resourced released to the O/S prior to shutting down
or you would have memory leaks occur.

.Net framework was intended to resolve this memory leak situation by
having a standard Object system that was constantly collected, as long
as you utilized its own object structure through inherits, imports,
implements, etc.

On Jun 24, 5:00 am, ankit m a cool dude with hot atitude
<jainismru...@gmail.com> wrote:
> Hi All,
>
> I am having a small problem regarding memory management in .NET.
>
> Suppose we declared and defined a string variable str="Today is a confusing
> day"
> Now we used this string in our code. After that we need to have some other
> data in the str variable. So before assigning it some other string like
> str="Now all the confusions are resolved" we need to dispose the memory held
> by previously assigned string as strings are immutable.
>
> Please don't tell me about StringBuilder as I can not use it becoz I have to
> do a lot of split,indexOf,lastindexof,Substring operations.
>
> Thanks in advance,
> Akki

-- 
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to dotnetdevelopment@googlegroups.com
To unsubscribe from this group, send email to
dotnetdevelopment+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net

Reply via email to