Re: [fpc-pascal] Interface reference counting

2009-04-02 Thread dmitry boyarintsev
> var >   d3d: IDirect3D9 = nil; // Direct3D interface no need in this. any interface type variable is always initialized with 'nil' value. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Interface reference counting

2009-04-02 Thread Graeme Geldenhuys
On Thu, Apr 2, 2009 at 1:46 PM, Felipe Monteiro de Carvalho wrote: > Hello, > > Just to be sure, when using an interface from COM, can I just ignore > it and the compiler will release it when it's scope ends, or do I need > to manually set the variable to nil? When it goes out of scope it gets fr

[fpc-pascal] Interface reference counting

2009-04-02 Thread Felipe Monteiro de Carvalho
Hello, Just to be sure, when using an interface from COM, can I just ignore it and the compiler will release it when it's scope ends, or do I need to manually set the variable to nil? var   d3d: IDirect3D9 = nil; // Direct3D interface begin   // create the Direct3D interface   d3d := Direct3DCrea