mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 13:21:35 +02:00
fcl-passrc: fixed releasing canonical set of anonymous enumtype
git-svn-id: trunk@36241 -
This commit is contained in:
parent
c0fd038eaa
commit
0c66d8b362
@ -3497,8 +3497,10 @@ begin
|
||||
EnumScope:=TPasEnumTypeScope(El.CustomData);
|
||||
if EnumScope.CanonicalSet<>Parent then
|
||||
begin
|
||||
ReleaseAndNil(TPasElement(EnumScope.CanonicalSet));
|
||||
if EnumScope.CanonicalSet<>nil then
|
||||
EnumScope.CanonicalSet.Release;
|
||||
EnumScope.CanonicalSet:=TPasSetType(Parent);
|
||||
Parent.AddRef;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -2094,6 +2094,7 @@ begin
|
||||
{$if defined(debugrefcount) or defined(VerbosePasTreeMem)}writeln('TPasElement.Destroy ',Name,':',ClassName);{$ENDIF}
|
||||
raise Exception.Create('');
|
||||
end;
|
||||
FParent:=nil;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user