Issues.00464 - lordmundi/wikidoctest GitHub Wiki
00464: memory leak in canvas plugin
Summary: memory leak in canvas plugin
Created: 2012–12–21 11:32
Status: Released
Category: Bug
From: frankie
Version: 2.2
Released_In: 2.3
Description:
It looks like there is some sort of memory leak when creating and deleting a canvas. I noticed when creating and deleting a canvas with an image on it. I'm not sure if this is related to Issue Issues.00461.
Some code to recreate the issue (use any image file in place of the TST_PAT_BLACK.gif):
proc create_tp_canvas { view tp_height tp_width tp_filename } {
global canvas_enable_count
# Create a canvas and bind it to the viewport
dsp_canvas create tp_canvas_$view -nrows $tp_height -ncols $tp_width
# Place canvas in view
dsp_canvas place tp_canvas_$view -in_display [dsp.view $view get -mapping].$view
# Add test pattern to Canvas
tp_canvas_$view create image $tp_filename 0 $tp_height $tp_width 0
incr canvas_enable_count
puts "Canvas enabled $canvas_enable_count times"
}
proc update_canvas { view tp_height tp_width tp_filename } {
global canvas_currently_on env
if { $canvas_currently_on } {
dsp_canvas delete tp_canvas_$view
set canvas_currently_on 0
} else {
create_tp_canvas MAIN 300 400 $env(USERDATA)/gui/images/TST_PAT_BLACK.gif
set canvas_currently_on 1
}
}
set canvas_currently_on 0
set canvas_enable_count 0
doug.callback add timer -delay 0.025 "update_canvas MAIN 300 400 $env(USERDATA)/gui/images/TST_PAT_BLACK.gif"
Comments
brad Jan 02 2013 at 10:12am: This has been fixed.
Associated Commits
| commit | f761856c49fc4f562066a567ce1efc59ed8c5c81
link7 |
||
| Author: | Brad Bell
|
| Date: | Wed Jan 2 10:10:12 2013 -0600
|
| Message: | [@Issue 00464: fixed memory leak that occurred when deleting a canvas
@] |
Affected Files:
plugin_Darwin/dsp_canvas.so | Bin 124044 -> 124044 bytes
plugin_Linux_FC3/dsp_canvas.so | Bin 144191 -> 138431 bytes
plugin_Win32/dsp_canvas.dll | Bin 521714 -> 521714 bytes
3 files changed, 0 insertions(+), 0 deletions(-)
| commit | 2364d4613a6a49195a7922d2c3f22e578c8e2043
link8 |
||
| Author: | Brad Bell
|
| Date: | Wed Jan 2 10:05:32 2013 -0600
|
| Message: | [@EDGE Issue 00464: Fixed memory leak in dsp_canvas that occurred when deleting
and recreating a canvas @] |
Affected Files:
src/plugins/dsp_canvas.c | 21 +++±----------------
1 file changed, 4 insertions(+), 17 deletions(-)