Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default Class module memory leak?

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default Class module memory leak?

Hello JLGWhiz

Thanks for your reply.

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.


You're absolutely right, and I'm embarrased! Before posting this, the
application did seem to be operating OK when run "normally". However,
right after posting this, I fired it up again, and immediately got an
"out of stack space" message. This had not happened before (and I've
been working on this for a few days).

Sure enough, it was stuck in a loop - a typo in a property Let
statement was constantly updating the property instead of the
variable, I'm sorry to have troubled you about this, my only (poor)
excuse for not picking up on this right away is my lack of experience
working with class modules,

Again, thanks so much for your reply,

Dave U

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Class module memory leak?

Don't be embarrassed or apologetic. We all do it once in a while. The
important thing is that you found the problem. Happy I could help.



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

Thanks for your reply.

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.


You're absolutely right, and I'm embarrased! Before posting this, the
application did seem to be operating OK when run "normally". However,
right after posting this, I fired it up again, and immediately got an
"out of stack space" message. This had not happened before (and I've
been working on this for a few days).

Sure enough, it was stuck in a loop - a typo in a property Let
statement was constantly updating the property instead of the
variable, I'm sorry to have troubled you about this, my only (poor)
excuse for not picking up on this right away is my lack of experience
working with class modules,

Again, thanks so much for your reply,

Dave U


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
XL 2007 - Out of Memory - memory leak/bug? PCLIVE Excel Discussion (Misc queries) 0 March 23rd 09 03:31 PM
Add-in memory leak Curt Johnson Excel Programming 0 November 19th 07 04:52 AM
Memory Leak Sakkie Excel Programming 4 November 19th 06 09:17 AM
Memory Leak MD Excel Programming 1 May 28th 04 05:14 PM
Memory Leak using ADO 2.6 Jason[_17_] Excel Programming 2 August 26th 03 02:42 PM


All times are GMT +1. The time now is 12:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"