[REGEDIT]
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 29 Jun 2013 19:22:00 +0000 (19:22 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 29 Jun 2013 19:22:00 +0000 (19:22 +0000)
commit024afb5abff3e320fb70e5cfb777c6f465a00860
tree0f480e11c7e7d15afc2f03070df3646b7e271874
parentfefd11144ae13d549101b785a937f2ebfa5744cd
[REGEDIT]
Fix tree-view's image-list handle leakage when application quits.
Loosely based on a patch by Edijs Kolesnicovičs and Grégory Macário Harbs

NOTE: Always cleanup / destroy (or, try to) things in the reverse way they are created / initialized (i.e. in a symmetrical way). Therefore, destry the associated tree-view's image-list in the DestroyTreeView function, which is the opposite of CreateTreeView (which calls InitTreeViewImageLists). The same mechanism is already used by the list-view. For completeness, add a parameter to the DestroyTreeView function (a handle to a tree-view) so that we can pass to it the global tree-view's handle (see what's done in WM_DESTROY message handling in ChildWndProc).

CORE-6856 #resolve #comment Should be fixed in revision r59371. See the commit log for more details. Thanks :)

svn path=/trunk/; revision=59371
reactos/base/applications/regedit/childwnd.c
reactos/base/applications/regedit/main.h
reactos/base/applications/regedit/treeview.c