Bugs item #2078867, was opened at 2008-08-27 20:28 Message generated for change (Comment added) made by lebert You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=111005&aid=2078867&group_id=11005
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: Program Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Bert Wesarg (lebert) Assigned to: Nobody/Anonymous (nobody) Summary: memory leak in readCheckMacroString() Initial Comment: I think there are memory leaks of the compiled program in case runWindow == NULL (aka macro checking). And for the case runWindow != NULL and runWindow->macroCmdData != NULL I'm not sure. ---------------------------------------------------------------------- >Comment By: Bert Wesarg (lebert) Date: 2008-09-16 22:56 Message: This is an implementation of my 'pseudo frame' idea. Patch applies after disable-FreeProgram.patch.txt from BUG#2113904 (which applies after fix-memleak-in-readCheckMacroString.patch.txt). File Added: FreeProgram-after-RunMacroAsSubrCall.patch.txt ---------------------------------------------------------------------- Comment By: Bert Wesarg (lebert) Date: 2008-09-16 20:13 Message: Ok, here is a patch: it calls FreeProgram() in the case runWindow == NULL. The other case is not a leak, because runMacro() is responsible for freeing the prog. This is only a smal step, as pointed out in some new comments there are more leaks. File Added: fix-memleak-in-readCheckMacroString.patch.txt ---------------------------------------------------------------------- Comment By: Bert Wesarg (lebert) Date: 2008-09-16 12:12 Message: I think I have an idea, how to prevent this memory leak, of the just compiled program (which are run with RunMacroAsSubrCall): before setting up the new frame for this program, setup a pseudo frame, which has as code a function which free the program on top of the stack, and push the to be run program onto the stack. Therefore, if the program returns, this pseudo stack is executed, which frees the program. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=111005&aid=2078867&group_id=11005 -- NEdit Develop mailing list - [email protected] http://www.nedit.org/mailman/listinfo/develop
