|
@@ -19,8 +19,11 @@ begin
|
|
|
Exit;
|
|
|
if Assigned(AFmxObject.Owner) then
|
|
|
AFmxObject.Owner.RemoveComponent(AFmxObject);
|
|
|
- if Assigned(AFmxObject.Parent) then
|
|
|
+ if Assigned(AFmxObject.Parent) then begin
|
|
|
+ // fix release error in 10.4, eg: TMemo on TFrame, Windows.
|
|
|
+ AFmxObject.SetRoot(nil);
|
|
|
AFmxObject.Parent := nil;
|
|
|
+ end;
|
|
|
FreeObject(AFmxObject);
|
|
|
end;
|
|
|
|