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 := Direct3DCreate9(D3D_SDK_VERSION);

  // ... use the interface here

  d3d := nil; // necessary or not?
end;

thanks,
-- 
Felipe Monteiro de Carvalho
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to