base_graphics_backend
David Bateman
David.Bateman at motorola.com
Wed Sep 10 06:51:08 CDT 2008
Michael Goffioul wrote:
> On Wed, Sep 10, 2008 at 9:45 AM, Michael Goffioul
> <michael.goffioul at gmail.com> 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 David.Bateman at motorola.com
Motorola 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
More information about the Octave-maintainers
mailing list