Welcome, Guest. Please login or register.

Author Topic: OS3.5/3.9 memory leak???  (Read 2406 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline SteadyTopic starter

OS3.5/3.9 memory leak???
« on: July 25, 2003, 10:53:24 AM »
Hello all,

I am just reaching the end of writing something and before release I am doing the right thing by running it through Commodore's stress-testing software.

Suddenly, I am starting to regret that. No enforcer hits or nasty sneaky crashes, but the drip utility should be renamed to flow in this instance. It is reporting some serious memory leaks!!!

This worries me because by nature my program does not allocate and free much memory. There are only a few such instances and they are all accounted for (although I am continuing to comb each line to be sure I haven't missed anything...).

I use a mix of reaction and gadtools. Here are my questions:

1) When a window object is created with attached layers/gadgets etc, are these all destroyed and resources deallocated when the window object is destroyed? The documentation and ClassAct examples lean toward this being true.

2) Does anyone know of other memory losses in regards to programs running from within the OS3.9 environment (such as memory used by VNC shell etc).

Any help much appreciated...  :-D
 

Offline SteadyTopic starter

Re: OS3.5/3.9 memory leak???
« Reply #1 on: July 25, 2003, 11:23:59 AM »
I am seeing this happen in the 3.9 classes.

The answer to your question is yes and yes.

Thanks for the offer to test. I won't lump that on you just yet... I think I should complete my code checking first  ;-) . I do believe that I won't find it.

A bit more info:
The memory loss varies even when I use the program in the same way???

Also, the following classes are being used:
window.class
layout.gadget
button.gadget
bitmap.image
checkbox.gadget
string.gadget
label.image
scroller.gadget
getfile.gadget
chooser.gadget
bevel.image
arexx.class
 

Offline SteadyTopic starter

Re: OS3.5/3.9 memory leak???
« Reply #2 on: July 26, 2003, 05:51:16 PM »
Hmm... replying to myself. Not a good sign.

It turns out there is no memory leak :-D. FYI in case anyone has similar results when testing their own progs, I was able to prove it using a combination of MungWall in SNOOP mode with Sushi capturing the input to a file, then running StripSnoop to confirm. It appears that drip captures a lot more than you really want it to these days (with history buffers etc in today's shells).