[fpc-pascal] Smart Pointers
    Anthony Walter 
    sysrpl at gmail.com
       
    Tue May 10 22:33:20 CEST 2016
    
    
  
Maciej,
>From your example code, the usage looks exactly like what I'd want. One
question though. Would the magic code also work with var and out arguments?
That is with (note these functions are generic):
procedure Foo1<T>(A: TArray<T>);
procedure Foo2<T>(var A: TArray<T>);
procedure Foo3<T>(out A: TArray<T>);
Where each can be called with a TManagedArray<T> as the "A" argument
without qualifying the Instance field?
var
  A: TManagedArray<Integer>;
begin
  Foo3(A);
  Foo2(A);
  Foo1(A);
end;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160510/adb96642/attachment.html>
    
    
More information about the fpc-pascal
mailing list