Package wtf :: Module util :: Class PooledInterface
[hide private]
[frames] | no frames]

Class PooledInterface

source code

object --+
         |
        PooledInterface

Interface for pooled objects
Instance Methods [hide private]
 
destroy(self)
Destroy the object
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

destroy(self)

source code 

Destroy the object

The method has to advise the pool to forget it. It should call the del_obj method of the pool for that purpose. In order to achieve that the object needs to store a reference to pool internally. In order to avoid circular references it is wise to store the pool as a weak reference (see weakref module).