simulavr-devel
[Top][All Lists]
Advanced

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

[Simulavr-devel] [bug #13680] new MirrorNet in Pin causes memory leak


From: anonymous
Subject: [Simulavr-devel] [bug #13680] new MirrorNet in Pin causes memory leak
Date: Thu, 7 Jul 2005 22:31:06 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050610 Firefox/1.0.4 (Debian package 1.0.4-3)

URL:
  <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=13680>

                 Summary: new MirrorNet in Pin causes memory leak
                 Project: Simulavr: an AVR simulator
            Submitted by: None
            Submitted on: Thu 07/07/2005 at 22:31
                Category: Simulation
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: address@hidden
             Open/Closed: Open

    _______________________________________________________

Details:

I detected memory leak about 0.6 MB/sec in my program. Valgrind showed that it
is MirrorNets in Pin constructors.

As I see MirrorNet cannot to delete itself :) I even tried to add next lines
to Net.RegisterNet

        // not good solution, but otherwise we get memory leak
        if(dynamic_cast<MirrorNet*>(connectedTo)){
          delete connectedTo;
          connectedTo = 0;
        }

But this causes other problems when pin is assigned to another pin. Pointer is
copied and MirrorNet is freed more than once.

There should be some solution. By the way, Pin.connectedTo is public which may
cause more problems.



    _______________________________________________________

Carbon-Copy List:

CC Address                          | Comment
------------------------------------+-----------------------------
olegus --AT-- ut --DOT-- ee         | Originator Email




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=13680>

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





reply via email to

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