Page 1 of 1

[Weak] TUniDataSetSpecificOptions.FOwner

Posted: Fri 07 Jun 2013 12:22
by CristianP
Hello,

TUniDataSetSpecificOptions.FOwner must be marked as [Weak] for ARC because it generates a reference cycle.

TUniQuery for example will have RefCount 2 immediately after creation and I need to call DisposeOf to free the object.

And I think the same is for TUniConnectionSpecificOptions.FOwner

Best Regards,
Cristian Peta

Re: [Weak] TUniDataSetSpecificOptions.FOwner

Posted: Fri 07 Jun 2013 12:59
by AlexP
Hello,

Thank you for the information, we have added an attribute [week] to TUniDataSetSpecificOptions.FOwner and TUniConnectionSpecificOptions, as well as to TUniTransactionSpecificOptions.

Re: [Weak] TUniDataSetSpecificOptions.FOwner

Posted: Mon 10 Jun 2013 09:03
by CristianP
Hello,

And a little suggestion.
In my opinion for the future there would be better to use

Code: Select all

{$IFDEF AUTOREFCOUNT}[weak]{$ENDIF}
instead of

Code: Select all

{$IFDEF NEXTGEN}[weak]{$ENDIF}
When ARC will be introduced to desktop compilers, NEXTGEN would not be there.

Best Regards,
Cristian Peta

Re: [Weak] TUniDataSetSpecificOptions.FOwner

Posted: Mon 10 Jun 2013 09:57
by AlexP
Hello,

Thank you for the information, we know about these defines. There is no difference between their using for the time being. We will replace these defines in the new version.