octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #55287] Memory leak in graphics subsystem


From: Rik
Subject: [Octave-bug-tracker] [bug #55287] Memory leak in graphics subsystem
Date: Tue, 15 Jan 2019 01:02:28 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Follow-up Comment #54, bug #55287 (project octave):

I went back to the problem changeset and expanded the destructor for ft_render
to report when it was being executed.


ft_render::~ft_render (void)
{
  std::cerr << "~ft_render executing" << std::endl;
}


I find that when I just plot something, plot (1:10), the destructor is called
4 times.  I believe that this corresponds with the title, xlabel, ylabel, and
zlabel objects.

However, when I execute clf then the destructor is called 5 times.  Using a
debugger, the backtrace for the fifth call is


#0  ft_render::~ft_render (this=0x55f77985d348, __in_chrg=<optimized out>)
    at libinterp/corefcn/txt-eng-ft.cc:319
#1  0x00007f728589e5dc in axes::properties::~properties (this=0x55f77985c3b0,

    __in_chrg=<optimized out>) at libinterp/corefcn/graphics.h:5201
#2  0x00007f72858a8000 in axes::~axes (this=0x55f77985c3a0,
__in_chrg=<optimized out>)
    at libinterp/corefcn/graphics.h:7524
#3  0x00007f72858a803c in axes::~axes (this=0x55f77985c3a0,
__in_chrg=<optimized out>)
    at libinterp/corefcn/graphics.h:7524
#4  0x00007f7285766315 in graphics_object::~graphics_object
(this=0x7ffd6165c9a0, 
    __in_chrg=<optimized out>) at libinterp/corefcn/graphics.h:3247
#5  0x00007f72857839c6 in delete_graphics_object (h=...) at
libinterp/corefcn/graphics.cc:2620
#6  0x00007f7285783a62 in delete_graphics_object (val=-18.717296929230308)
    at libinterp/corefcn/graphics.cc:2647
#7  0x00007f7285783ae5 in delete_graphics_objects (vals=...)
    at libinterp/corefcn/graphics.cc:2654
#8  0x00007f7285886d46 in F__go_delete__ (args=...) at
libinterp/corefcn/graphics.cc:10578


In this case, besides the children of the axes, the axes destructor is called.
 The axes destructor is empty, but it also calls the ~properties destructor. 
As far as I can see, this destructor is also empty.  The only thing in the
ft_render destructor is the print statement to cerr that I just added.  So,
I'm sure that more work is done by clf.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55287>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]