Welcome, Guest. Please login or register.

Author Topic: OS3.5/3.9 memory leak???  (Read 2395 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 Mr_Capehill

  • Full Member
  • ***
  • Join Date: May 2002
  • Posts: 189
    • Show only replies by Mr_Capehill
Re: OS3.5/3.9 memory leak???
« Reply #1 on: July 25, 2003, 11:06:58 AM »
It might be possible that some early ReAction classes leak memory. I haven't noticed this with latest Boing Bag.

Ok, do you close libraries and dispose window objects?  :-)

You can send your program to jniemima(at)mail.student.oulu.fi and I might give a test, but not probably during weekend.
 

Offline SteadyTopic starter

Re: OS3.5/3.9 memory leak???
« Reply #2 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 #3 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).
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: OS3.5/3.9 memory leak???
« Reply #4 on: July 26, 2003, 06:23:11 PM »
@Steady,

Thats good to hear. Its also good that you pointed out your findings for the benefit of the rest of us ;-)
int p; // A
 

Offline KennyR

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 8081
    • Show only replies by KennyR
    • http://wrongpla.net
Re: OS3.5/3.9 memory leak???
« Reply #5 on: July 26, 2003, 06:27:48 PM »
The ReAction memory leaks were already known, but dismissed as FUD for a long time. I don't know the particulars though.
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: OS3.5/3.9 memory leak???
« Reply #6 on: July 26, 2003, 06:29:17 PM »
GUIs....when in doubt, write your own (jokingly)
int p; // A