I have noticed that source code in unit “Hydra.RO.RODLReader.pas” has been significantly modified compared to versions before 6.6.0.1317. Unfortunately, one of the consequences is the fact, that there is now a massive memory leak in the “MergeRODLs” method, namely - the local variables “l_mainRODL, l_subRODL” are never released and remain in memory.
See this:
procedure THYRODLReader.MergeRODLs(var MainRODL: ROUTF8String; const SubRODLs: array of ROUTF8String);
procedure _MergeRODLs(aMainRODL, aSubRODL: TRODLLibrary);
begin
......
end;
var
// <BUG> these variables are never released
l_mainRODL: TRODLLibrary;
l_subRODL: TRODLLibrary;
// <BUG/>
i: Integer;
begin
....
end;
Comparing the source code with the previous Hydra release (6.6.0.1317), I can’t find any indication that the fix has actually occurred. The content of the “Hydra.RO.RODLReader.pas” unit is identical, I don’t see any change. The only change is in the “Hydra.VCL.ControlAsVisualPlugin.pas” unit.
I am a bit confused… can you please specify how the fix was resolved in the 6.6.0.1319 release?
thank you for your reply and apology, nothing tragic happened. It may look meticulous on my part, but I am responsible for configurations of environments from which our products are built… and there must be no doubt about the state and version of third-party libraries included inside.
unfortunately, the fix doesn’t work well… instead of a relatively harmless memory leak it now causes an AV error. The reason for this is clear: entities added from l_subRODL to l_mainRODL are lost when instance of l_subRODL is destroyed, but l_mainRODL still holds references to them.
The current concept of entities in RODL does not allow an entity to be safely transferred from one RODL library to another because both RODL libraries hold a reference to the entity.
I’ve attached a temporary fix that solved the problem, at least partially… see comments tagged with “CALLIDA”