Free FMX component in Android / iOS [duplicate]

  

There are a lot of discussion about how to free component in mobile device with Firemonkey, but that not response to my answer.
With 10.4 RAD Studio version, Embarcadero unified memory management.
I create a TFrame with :
FFrame := TMyFrame.Create(nil);
FFrame.OnClickCloseButton := CloseFrame;

On my CloseFrame method I do :
FFrame.DisposeOf;
FFrame := nil;

It’s ok on Android, but on iOS I got a Access Violation. Normally with 10.4 version of the IDE, I can do :
FFrame.Free;

But I got application crash in iOS.
What I need to do is really the most simple stuff. Create something and free it.
What do you recommend ? Use interface with a IFrame for example ?

Comments are closed.