[Bf-python] Evil Strings
cbarton at metavr.com
Mon Jul 16 14:02:34 CEST 2007
Hi, joe pointed this out to me the other day,
For the Draw module, the tooltips passed to the GUI are pointers to
pythons strings but they are not incref'ing the strings or making copies.
This is bad - since the strings could be deallocated by python but the
tooltip still reference that pointer.
Options could be somehow make the button incref/decref with the button
(dont think this is easy but would mean we could be sure the pointer was
always valid) - or make a copy of the tooltip and somehow manage that.
I suspect this is one of the reasons If always found the Draw module flaky.
More information about the Bf-python