Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: Jenna on January 01, 2008, 09:37:38 pm
-
I just posted a bug-report and a patch for the following problem:
C::B often says the layout has changed, even if it is the same and asks therefor if it should be saved.
This happens, because the actual layout is fetched with wxAuiManager::SavePerspective(). The function returns a serialized array containing the layout info. Sometimes the order of the InfoPanes in the array has changed, but their content is the same. Until now C::B compares the serialized arrays (the actual one and a saved one). If the order inside the array has changed, the strings are different and C::B believes that the content has changed.
I wrote a function that splits the strings in arrays, sorts them and compares the arrays. If they differ true is returned.
Bug report (http://developer.berlios.de/bugs/?func=detailbug&bug_id=12827&group_id=5358)
Patch (http://developer.berlios.de/patch/?func=detailpatch&patch_id=2311&group_id=5358)
-
I'm still seeing this problem. If I launch C::B and close it (without opening any files or project) it still asks to save the layout.
Also, this patch introduced three new memory leaks.
-
I'm still seeing this problem. If I launch C::B and close it (without opening any files or project) it still asks to save the layout.
Not really - the patch works indeed better. I onle mean "better" casue it's far from being perfect. The issue is, that if you just select another part of the IDE the layout data becomes different. Also if you e.g. maximize/restore the layout is different. And this is what usually happens all the time when you are asked.
Also, this patch introduced three new memory leaks.
Fixed that one in SVN. Thanks! Hey Yiannis: You did apply the first revision, right...?! :lol:
-
Also, this patch introduced three new memory leaks.
Fixed that one in SVN. Thanks! Hey Yiannis: You did apply the first revision, right...?! :lol:
Thanks for fixing this. It was my error.
I believed that wxWidgets is able to free memory allocated by member-functions on it's own, when leaving the function where it happens and the variables, or the pointers to the memoryrange become invalid.