|
From: | David Bateman |
Subject: | Re: base_graphics_backend |
Date: | Wed, 10 Sep 2008 13:51:08 +0200 |
User-agent: | Thunderbird 2.0.0.16 (X11/20080725) |
Michael Goffioul wrote:
On Wed, Sep 10, 2008 at 9:45 AM, Michael Goffioul <address@hidden> wrote:Ryan: could you break you code in your backend's object_destroyed method to see where it does come from?Sorry, I didn't notice the second backtrace in your other mail. I think I see the problem (or at least one): in set_defaults, the title and labels are reassigned without taking care of freeing them, so we're leaking handles. Michael.
Yes this was part of the patch I sent to you offline @@ -2158,7 +2171,9 @@ axes::properties::set_defaults (base_gra axes::properties::set_defaults (base_graphics_object& obj, const std::string& mode) { + gh_manager::free (title.handle_value ()); title = graphics_handle (); + box = "on"; key = "off"; keybox = "off"; @@ -2182,9 +2197,14 @@ axes::properties::set_defaults (base_gra ylimmode = "auto"; zlimmode = "auto"; climmode = "auto"; + + gh_manager::free (xlabel.handle_value ()); + gh_manager::free (ylabel.handle_value ()); + gh_manager::free (zlabel.handle_value ()); xlabel = graphics_handle (); ylabel = graphics_handle (); zlabel = graphics_handle (); + xgrid = "off"; ygrid = "off"; zgrid = "off";Unfortunately what this does is that instead of having the error that the title [xyz]label objects point to the wrong object type, they end up pointing to an invalid object. I still have no idea why.
D. -- David Bateman address@hiddenMotorola Labs - Paris +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob) 91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax) The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary
[Prev in Thread] | Current Thread | [Next in Thread] |