python: Fix the reference counting for python events placed on the eventq.
We need to add a reference when an object is put on the C++ queue, and remove a reference when the object is removed from the queue. This was not happening before and caused a memory problem.
This commit is contained in:
@@ -36,7 +36,7 @@ mainq = internal.event.cvar.mainEventQueue
|
||||
def create(obj, priority=None):
|
||||
if priority is None:
|
||||
priority = internal.event.Event.Default_Pri
|
||||
return internal.event.PythonEvent(obj, priority)
|
||||
return PythonEvent(obj, priority)
|
||||
|
||||
class Event(PythonEvent):
|
||||
def __init__(self, priority=None):
|
||||
|
||||
Reference in New Issue
Block a user