[Bf-python] data corruption

Martin Poirier theeth at yahoo.com
Thu Nov 17 22:07:36 CET 2005



--- Campbell Barton <cbarton at metavr.com> wrote:

> Its not quite right now.
> Im exporting the scene and then it draws the objects
> with a Cyan Dot. 
> (multi user object)
> Even when the export is finished. - This never
> happened before.

Is you object referenced with a global variable?
In that case, the python interpreter wouldn't collect
it after the script finishes running because the BPY
interpreter keeps the global dict between runs (or at
least, it used to).

So, it would never decrement the user because python
is sill using it.

It's not a bug, it's just safe.

Assuming I am correct, the proper way to fix it would
be to encapsulate your export code in a function. Not
storing anything other than constants, classes and
functions in the global name space is good practice on
the long run.

Martin


		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com



More information about the Bf-python mailing list