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

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

[Octave-bug-tracker] [bug #44420] Memory leaks in 4.0 RC


From: Rik
Subject: [Octave-bug-tracker] [bug #44420] Memory leaks in 4.0 RC
Date: Sat, 21 Mar 2015 02:17:09 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0

Follow-up Comment #6, bug #44420 (project octave):

Using the valgrind log I can see that a whole slew of small 8 byte leaks are
due to this code in ov-classdef.cc at line 701.


static cdef_class
make_class (const std::string& name,
            const std::list<cdef_class>& super_list = std::list<cdef_class>
())
{
  cdef_class cls (name, super_list);

  cls.set_class (cdef_class::meta_class ());
  cls.put ("Abstract", false);
  cls.put ("ConstructOnLoad", false);
  cls.put ("ContainingPackage", Matrix ());
  cls.put ("Description", std::string ());
  cls.put ("DetailedDescription", std::string ());
  cls.put ("Events", Cell ());
  cls.put ("Hidden", false);
  cls.put ("InferiorClasses", Cell ());
  cls.put ("Methods", Cell ());
  cls.put ("Properties", Cell ());
  cls.put ("Sealed", false);


Everywhere an empty Cell() object is created causes a leak.

I believe the put routine is defined at ov-classdef.h:408.


  void put (const std::string& pname, const octave_value& val)
  { map.assign (pname, val); }


Maybe when a map goes out of existence it is somehow failing to call the the
destructor for the right-side value.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44420>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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