[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: leak in make-network-process
From: |
Stefan Monnier |
Subject: |
Re: leak in make-network-process |
Date: |
Tue, 30 Dec 2008 16:18:28 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
>> Actually only this is needed:
>>
>> {
>> struct Lisp_Process *p = XPROCESS (proc);
>> /* Set all Lisp_Object members of struct Lisp_Process to nil. */
p-> childp = Qnil;
p-> status = Qnil;
>> }
>>
>> Why can't GC get these fields? Should something like this be checked
>> in?
> Maybe something else in Lisp is still referring to that dead process
> object.
In any case, I think it's OK to explicitly set those fields to nil.
For objects that can be killed (and not revived) like frames, terminals,
processes, it's OK to zero out (some of) their fields to make sure that
even if someone holds on to them, what they referred to can be GC'd (as
long as it makes no other visible difference: e.g. frame parameters
should be nil'd).
Stefan