Re: Floating references
- From: Greg Ewing <greg ewing canterbury ac nz>
- To: gtk-list gnome org
- Subject: Re: Floating references
- Date: Wed, 07 Jun 2017 10:30:08 +1200
Chris Vine wrote:
So I guess the question is why pure
(non-GInitiallyUnowned) GObjects start with a reference count of 1,
instead of a count of 0 as in other similar implementations.
CPython starts reference counts at 1, and it works perfectly
well -- the code that allocates the object initially owns a
reference to it, which it is obliged to dispose of in some
way. I can't see why GInitiallyUnowned was thought to be
needed.
--
Greg
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]