[pywin32-bugs] [ pywin32-Bugs-1489690 ] Memory Leak: PyCWnd objects are never freed
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2006-05-16 16:46:09
|
Bugs item #1489690, was opened at 2006-05-16 18:42 Message generated for change (Comment added) made by kxroberto You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1489690&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. >Category: pythonwin Group: None Status: Open Resolution: None >Priority: 6 Submitted By: kxroberto (kxroberto) Assigned to: Nobody/Anonymous (nobody) Summary: Memory Leak: PyCWnd objects are never freed Initial Comment: Memory leak: PyCWnd objects are never free'd. ( and minor bug: If Window is never CreateWindow'ed + Destroy'Ed, the HookXXX'ed function-objects are also never free'd. Maybe the "Py_INCREF(hookedObject);" in win32cmd.cpp/Line228 (and associated DODECREF) are unnecessary : the Window/Hooklist must hold the hooked method, but not the reverse? ) I post examples in follow up - as sf main post destroys indentation. -robert ---------------------------------------------------------------------- >Comment By: kxroberto (kxroberto) Date: 2006-05-16 18:46 Message: Logged In: YES user_id=972995 The bug manifests in long running win32ui apps and can be made visible: The memory consumption goes infinitely up doing this (both - with and without .CreateWindow/.DestroyWindow called : >>> for i in range(10000): ... w=win32ui.CreateWnd() ... #w.CreateWindow(None,"wef",wc.WS_OVERLAPPEDWINDOW,(0,0,100,100),win32ui.GetMainFrame(),1111) ... #w.DestroyWindow() ... strange: the refcount of a created Window is always minimum 2: >>> sys.getrefcount(w) 2 >>> -robert ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1489690&group_id=78018 |