A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-February/020235.html below:

[Python-Dev] A little GC confusion

[Python-Dev] A little GC confusionGreg Ewing greg@cosc.canterbury.ac.nz
Fri, 22 Feb 2002 15:41:29 +1300 (NZDT)
Kevin Jacobs <jacobs@penguin.theopalgroup.com>:

> I doesn't have any time to really look at your code, but I thought I'd point
> out a trick that several extension modules use to protect statically
> allocated type objects.

>         0,      /* set below */                 /* tp_alloc */
>         PySocketSock_new,                       /* tp_new */
>         0,      /* set below */                 /* tp_free */

I don't think that has anything to do with protecting the type
object.

As I understand it, static type objects are protected by
having their refcount statically initialised to 1, so that
it will never drop to zero.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg@cosc.canterbury.ac.nz	   +--------------------------------------+



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4