Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Memory leak in gf_draw_polyline()?: (2 Items)
   
Memory leak in gf_draw_polyline()?  
I notice that when I use gf_draw_polyline(), every call to the function 
seems to perform 6 more calls to malloc() than to free().  Or at least, 
that's what the "Malloc Information" view in Momentics says.  This is 
measurable both in single-stepping over the gf_draw_polyline() function 
and by running my app for an extended period of time and maintaining a 
count of the number of times gf_draw_polyline() is called.

Is this a known problem gf_draw_polyline(), or can it be caused by 
something I'm doing?  The lines being drawn look perfectly fine on the 
output images, and I never would have noticed the problem if my 
program's memory usage hadn't been building up unexpectedly.  In other 
words, I have no reason from the program's behavior to suspect that I'm 
using the function incorrectly.

I'm using development platform 6.5.0 for an x86 target system.  Also, 
I'm drawing to memory, and not to a physical display.
RE: Memory leak in gf_draw_polyline()?  
Known problem, contact support.

-----Original Message-----
From: Ronald Burkey [mailto:community-noreply@qnx.com] 
Sent: March 31, 2011 3:58 PM
To: advanced-graphics
Subject: Memory leak in gf_draw_polyline()?

I notice that when I use gf_draw_polyline(), every call to the function 
seems to perform 6 more calls to malloc() than to free().  Or at least, 
that's what the "Malloc Information" view in Momentics says.  This is 
measurable both in single-stepping over the gf_draw_polyline() function 
and by running my app for an extended period of time and maintaining a 
count of the number of times gf_draw_polyline() is called.

Is this a known problem gf_draw_polyline(), or can it be caused by 
something I'm doing?  The lines being drawn look perfectly fine on the 
output images, and I never would have noticed the problem if my 
program's memory usage hadn't been building up unexpectedly.  In other 
words, I have no reason from the program's behavior to suspect that I'm 
using the function incorrectly.

I'm using development platform 6.5.0 for an x86 target system.  Also, 
I'm drawing to memory, and not to a physical display.




_______________________________________________

Advanced Graphics
http://community.qnx.com/sf/go/post84496