Re: GObjectClass.dispose and bringing objects back to life
- From: David Nečas <yeti physics muni cz>
- To: Emmanuele Bassi <ebassi gmail com>
- Cc: gtk-devel-list gnome org, Benjamin Otte <otte gnome org>
- Subject: Re: GObjectClass.dispose and bringing objects back to life
- Date: Sun, 4 Dec 2011 17:03:54 +0100
On Sun, Dec 04, 2011 at 01:40:58PM +0000, Emmanuele Bassi wrote:
>
> this is, of course, not true: GNOME is full of badly written GObject
> code, mostly because it has been written at various stages of the
> learning process of various people. plus, the documentation is not
> entirely clear in a lot of places, thus the learning process can (and
> effectively is) broken.
> ...
>
> objects should obviously not be in a fully functional state after
> dispose - but they should be in a stable state, so that other objects
> referencing them from outside of the boundaries of their code space
> can still hold a valid reference to them, until such time that every
> reference can be released.
So, who thinks this idea is not actually inherently inconsistent please
please specify in the documentation, based on your rationale, how are
objects supposed to behave in the disposed state. Namely with respect
to (not) keeping impossible invariants, returning nontrivial
no-longer-available values, methods that normally create or acquire
something before returning it and other practical issues. Or say that
there can be certain things the object owners may not do with disposed
objects. Or anything. This
The object is also expected to be able to answer client method
invocations (with possibly an error code but no memory violation)
until finalize is executed.
has as, a practical guide, approximately the same value as ‘people
should live together in peace’.
Thank you in advance,
Yeti
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]