delphi - Changing the VCL Style at runtime leads to memory leak -
after reading this question, tried let end user change application's style @ runtime. has lead very long list of memory leaks content this:
a memory block has been leaked. size is: 12 block allocated thread 0x130c, , stack trace (return addresses) @ time was: 404b3e [frxdsgnintf.pas][system][@getmem$qqri][1993] 454b77 [system.sysutils][sysutils.widestralloc$qqrui] 454bb2 [system.sysutils] sysutils.strnew$qqrpxb] 53046e [vcl.controls][controls.twincontrol.destroywnd$qqrv] 57e1c7 [vcl.comctrls][comctrls.tcustomtreeview.destroywnd$qqrv] a53dee [jvcomctrls] tjvtreeview.destroywnd$qqrv] 530733 [vcl.controls] controls.twincontrol.destroyhandle$qqrv] 530703 [vcl.controls] controls.twincontrol.destroyhandle$qqrv] 530703 [vcl.controls] controls.twincontrol.destroyhandle$qqrv] 7552feb6 [enumthreadwindows] 530703 [vcl.controls][controls.twincontrol.destroyhandle$qqrv] block used object of class: unknown almost of leaks in frxdsgnintf.pas, except components on form lets user change style , point procedure:
with tdlgsettings.create(nil) // leak here according fastmm report try if showmodal = mrok then; release; end; does know if i'm doing wrong or expected behavior of tstylemanager when changing styles? here's code changes style @ runtime:
procedure tdlgsettings.cbthemechange(sender: tobject); begin tstylemanager.trysetstyle(cbtheme.text); // cbtheme.items lists themes included application end;
uses vcl.styles, vcl.themes, ufixmemoverflowvclstyle; link: http://www.delphi4arab.net/forum/showthread.php?t=9607
Comments
Post a Comment