#1 2020-05-12 22:33:26

radexpol
Member
From: Poland, Krk
Registered: 2019-11-29
Posts: 116

[BPL] Memory leak

Create the package that contains:

requires
  designide,
  adortl,
  rtl;

contains
  SynCommons in '..\..\Components\mORMot\SynCommons.pas';

every time I'm closing Delphi an exception occurs.

I tried to find out the line of code that could raise an error and found a leak in initialization part:

DocVariantType := TDocVariant(SynRegisterCustomVariantType(TDocVariant));

I suppose that we should free up that object in finalization?

Offline

#2 2020-05-13 07:30:12

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,673
Website

Re: [BPL] Memory leak

It is hold by the RTL variants.pp unit.

Offline

#3 2020-05-13 08:13:28

radexpol
Member
From: Poland, Krk
Registered: 2019-11-29
Posts: 116

Re: [BPL] Memory leak

OK,
I've added FreeAndNil(DocVariantType) to the finalization because exceptions on Delphi closing was extremely annoying.

Offline

Board footer

Powered by FluxBB