[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/4] psppire-data-window: Delete dataset when closing window.
From: |
Ben Pfaff |
Subject: |
Re: [PATCH 4/4] psppire-data-window: Delete dataset when closing window. |
Date: |
Mon, 09 Jul 2012 21:55:42 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Ben Pfaff <address@hidden> writes:
> John Darrington <address@hidden> writes:
>
>> On Sat, Jul 07, 2012 at 11:49:16PM -0700, Ben Pfaff wrote:
>>
>> The code added to psppire_data_window_dispose() in this commit
>> should probably go in a "finalize" function instead but there seems
>> to be a separate problem with references to PsppireVarSheet such
>> that if this new code is in "finalize" then dataset_destroy() will
>> call dict_clear() which will invoke the callbacks for PsppireDict
>> which will try to access the destroyed window.
>>
>> Your description seems to suggest to me, that either PsppireDict should
>> keep a reference to the window, or the callbacks should be disconnected
>> or rendered safe when the window is destroyed.
>
> The former doesn't sound like a good idea to me, because
> PsppireDict shouldn't know anything about the window.
>
> The latter makes sense, and in fact PsppireDict *does* disconnect
> the callbacks when the PsppireDict is destroyed. The issue is
> that the PsppireDict isn't getting destroyed because something is
> holding its reference count artificially high.
>
> For now I've pushed this commit but we do need to figure out why
> the PsppireDict isn't getting destroyed. I've been trying to
> figure that out all evening and have fixed a few minor bugs along
> the way but still haven't figured out the main issue. Better
> luck tomorrow night I guess.
I fixed the reference leak and moved the PsppireDataWindow code
to a finalize function.
[PATCH 2/4] psppire-dict: Make PsppireDict not own its "struct dictionary"., Ben Pfaff, 2012/07/08
Re: [PATCH 0/4] bug fixes for master, Ben Pfaff, 2012/07/08