Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
gpatton
Posts: 193
Registered: ‎12-29-2010
My Device: Bold 9900

Difference between Code, Data and Stack Memory

I'm running my app and went to the QNX System Information perspective in the IDE.

 

Noticed there are three numbers, Code, Data and Stack.

 

Pushing and popping pages, causes the Data to increase. Even though I pop and call the "page.destroy()" method, the Data still increases.

 

Code and Stack remain the same.

 

Is this a memory leak?

Developer
BBSJdev
Posts: 6,116
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30

Re: Difference between Code, Data and Stack Memory

Memory leaks are associated with the heap, so you'd be better off looking at the Malloc Information perspective.

 

Did the page you destroyed actually create anything, in which case you'd expect the data to go up.

 

Have a look here if you're worried...

 

http://developer.blackberry.com/native/documentation/bb10/com.qnx.doc.ide.userguide/topic/memory_und...  


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Developer
gpatton
Posts: 193
Registered: ‎12-29-2010
My Device: Bold 9900

Re: Difference between Code, Data and Stack Memory

[ Edited ]

Hi,

 

Thanks for the reply. I ran the app and checked our the Malloc perspective. I'm attaching a picture of what I see after normal use of the app. The purple bars (which I'm assuming) is the actual memory? Although that stays the same, the "Free" gray bars keep rising.

 

Am I in the clear here?

 

Attaching a picture. If needs moderator approval, please do so.

Thanks

 

G

Developer
BBSJdev
Posts: 6,116
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30

Re: Difference between Code, Data and Stack Memory

If you run through your app a number of times and the blue part stabilizes then probably yes, really hard to say for definite on a static picture.  The next step is to turn on checking at exit and see if all the memory is returned.


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.