[fpc-pascal] Managed properties idea
    Marcos Douglas B. Santos 
    md at delfire.net
       
    Mon Oct  9 14:43:50 CEST 2017
    
    
  
On Mon, Oct 9, 2017 at 5:24 AM, Maciej Izak <hnb.code at gmail.com> wrote:
> 2017-10-07 2:10 GMT+02:00 Michalis Kamburelis <michalis.kambi at gmail.com>:
>>
>> [...]
>
> mORMot framework has also nice solution for "auto free" (solution uses
> interfaces too):
>
> ===code begin===
>   with TAutoFree.One(o, TObject.Create) do
>   begin
>     ...
>     Another(o2, TObject.Create);
>     ...
>   end;
>
>   with TAutoFree.Several([
>     o, TObject.Create,
>     f, TFoo.Create,
>     sl, TStringList.Create])
>   do
>   begin
>     ...
>   end;
> ===code end===
>
> somehow similar in usage like "using" from C#
This TAutoFree just "put" the "finally" and call .Free for an array of
objects or does it something else?
Could you send the link of the implementation?
Best regards,
Marcos Douglas
    
    
More information about the fpc-pascal
mailing list