Memory leaks caused by TppGraphicsRendererManager.PlugIns
[This followup was posted to digital-metaphors.public.reportbuilder.general and a copy was sent to the cited author.]
Hello,
I have one quite a big project containint hunderds of units.
(XE3, RB 15 build 2)
With version 15 of the Report Builder I started do recieve memory leaks
caused by Report Builder:
---------------------------
Unexpected Memory Leak
---------------------------
An unexpected memory leak has occurred. The unexpected small block leaks
are:
13 - 20 bytes: TClassList x 1, TppGraphicsRendererPlugins x 1
21 - 28 bytes: Unknown x 1
---------------------------
OK
---------------------------
I tracked down what causes these memory leaks and discovered a
finalization section of ppGraphicsRenderer unit executes before a
finalization section of ppTableGridDrwCmd unit. However this shouldn't
occure as ppTableGridDrwCmd unit calls ppGraphicsRenderer, but I'm
afraid there is no way how to control this order. In fact initialization
sections of these units are called in a wrong order too.
As I can't see and 'clear' solution of the problem, I would like to
please you to implement some check in the finalization section of the
ppTableGridDrwCmd unit to avoid call of
TppGraphicsRendererManager.PlugIns.Remove
(TppGraphcsRendererTableGridCell) when the PlugIns container was already
destroyed. Otherwise this call will fire a code which crates new
instance of a class TppGraphicsRendererPlugins that will never be
destoyed (as the finalization section was already executed).
I understand this is probably more an error of the RAD Studio XE3, but I
hope the correction in your library can be delivered much faster.
However I was unable to reproduce the error in a simple project as
unfortunately this swapping of initialization/finalization section calls
occures only for my large project.
Best regards, Igor Gottwald
Hello,
I have one quite a big project containint hunderds of units.
(XE3, RB 15 build 2)
With version 15 of the Report Builder I started do recieve memory leaks
caused by Report Builder:
---------------------------
Unexpected Memory Leak
---------------------------
An unexpected memory leak has occurred. The unexpected small block leaks
are:
13 - 20 bytes: TClassList x 1, TppGraphicsRendererPlugins x 1
21 - 28 bytes: Unknown x 1
---------------------------
OK
---------------------------
I tracked down what causes these memory leaks and discovered a
finalization section of ppGraphicsRenderer unit executes before a
finalization section of ppTableGridDrwCmd unit. However this shouldn't
occure as ppTableGridDrwCmd unit calls ppGraphicsRenderer, but I'm
afraid there is no way how to control this order. In fact initialization
sections of these units are called in a wrong order too.
As I can't see and 'clear' solution of the problem, I would like to
please you to implement some check in the finalization section of the
ppTableGridDrwCmd unit to avoid call of
TppGraphicsRendererManager.PlugIns.Remove
(TppGraphcsRendererTableGridCell) when the PlugIns container was already
destroyed. Otherwise this call will fire a code which crates new
instance of a class TppGraphicsRendererPlugins that will never be
destoyed (as the finalization section was already executed).
I understand this is probably more an error of the RAD Studio XE3, but I
hope the correction in your library can be delivered much faster.
However I was unable to reproduce the error in a simple project as
unfortunately this swapping of initialization/finalization section calls
occures only for my large project.
Best regards, Igor Gottwald
This discussion has been closed.
Comments
There is a patch available that may fix this issue. Please send a short
email to support@digital-metaphors.com requesting the patch and we'll
send it to you as soon as possible.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com