diff options
author | Michael Schroeder <mls@suse.de> | 2014-04-04 14:09:10 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2014-04-04 14:09:10 +0200 |
commit | fdff34f4855b84438b5bff3f79cba33d6bf35865 (patch) | |
tree | 52d95c28d67c6ae1216dc532eec8474c3f9d9e66 /doc/libsolv-bindings.txt | |
parent | b8d3888fdcb2c625f9c025db9ca858ec8199d562 (diff) | |
download | libsolv-fdff34f4855b84438b5bff3f79cba33d6bf35865.tar.gz libsolv-fdff34f4855b84438b5bff3f79cba33d6bf35865.tar.bz2 libsolv-fdff34f4855b84438b5bff3f79cba33d6bf35865.zip |
more swig trickery: automaticall free the pool, add a disown method
Diffstat (limited to 'doc/libsolv-bindings.txt')
-rw-r--r-- | doc/libsolv-bindings.txt | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/doc/libsolv-bindings.txt b/doc/libsolv-bindings.txt index e8c4eb9..5a65235 100644 --- a/doc/libsolv-bindings.txt +++ b/doc/libsolv-bindings.txt @@ -201,8 +201,10 @@ Repositories, Dependencies, each indexed by Ids. pool = solv.Pool() pool = Solv::Pool.new() -Create a new pool instance. In most cases you just need -one pool. +Create a new pool instance. In most cases you just need one pool. +Note that the returned object "owns" the pool, i.e. if the object is +freed, the pool is also freed. You can use the disown method to +break this ownership relation. === ATTRIBUTES === @@ -311,9 +313,18 @@ generates. pool.free() pool.free() -Free a pool. This is currently done with a method instead of relying on -reference counting or garbage collection because it's hard to track every -reference to a pool. +Force a free of the pool. After this call, you must not access any object +that still references the pool. + + void disown() + $pool->disown(); + pool.disown() + pool.disown() + +Break the ownership relation betwen the binding object and the pool. After +this call, the pool will not get freed even if the object goes out of +scope. This also means that you must manually call the free method to free +the pool data. void setdebuglevel(int level) $pool->setdebuglevel($level); |