Re: Memory Leak?

Greg Young <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.advanced
Message-ID <[email protected]>
Sleep(55) just makes it take longer (same problem exists) ....

And you should never call GC.Collect()

Cheers,

Greg

On Mon, Dec 1, 2008 at 3:15 PM, Mark Hurd <[email protected]> wrote:
> On Tue, Dec 2, 2008 at 9:38 AM, Steve Johnson <[email protected]> wrote:
>> Likely, the problem is recursion.  Each call to DoEvents pumps messages,
>> which causes your VREADFIELDS function to be called from within itself.
>> Each call allocates another stack frame.  You'll eventually run out of stack
>> space and crash with a StackOverflowException.
>
> I agree that it is not due to the code sample provided in isolation.
> Whenever we need an idle loop we use a similar loop (with Sleep(55)),
> and when it is worth suggesting we know it would be a good time to do
> a GC.Collect we include that too.
>
> Regards,
> Mark Hurd, B.Sc.(Ma.)(Hons.)
>
> ===================================
> View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives
>



-- 
It is the mark of an educated mind to be able to entertain a thought
without accepting it.

===================================
View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.