View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default Class module memory leak?

The best that I can tell you is that Stack Overflow and Out of Memory
messages usually indicate some poorly written code. Infinite loops, self
perpetuating event code, etc. can all cause these kinds of messages. There
are some discussions on then on the web if you search for them.



"Dave Unger" wrote in message
...
Hello,

Running XL2007 on Windows XP
..
I’m currently working on a large project, where it’s starting to look
like making use of class modules would be the way to go. This is my
first “serious” venture into the world of class modules, so at this
point things are quite simple – in fact, so far all my code is copied,
more or less verbatim, from samples in Bullen-Bovey-Green’s
“Professional Excel Development” book.

Here’s the problem I’m running into. During development, there are
the usual stops and breaks to do a bit of tweaking/fixing. Then, at
some point I start getting “out of stack space” & “not enough
resource” messages, and even the VBE seems to get a bit befuddled.
However, if I shut down Excel and then re-open the application,
everything appears to work fine and Excel’s memory remains stable.

I don’t really know what I’m talking about here, but it seems to me
that the stops and breaks are leaving behind bits of class objects,
and Excel isn’t reclaiming that memory during the current session.
I’m just wondering if this is considered normal when working with
class modules.

I’d appreciate anyone’s comments on this. Thank you.

Regards,

Dave U