私は本当に混乱しています。
// initial class
type
TTestClass =
class( TInterfacedObject)
end;
{...}
// test procedure
procedure testMF();
var c1, c2 : TTestClass;
begin
c1 := TTestClass.Create(); // create, addref
c2 := c1; // addref
c1 := nil; // refcount - 1
MessageBox( 0, pchar( inttostr( c2.refcount)), '', 0); // just to see the value
end;
1が表示されるはずですが、0が表示されます。実行する割り当ての数に関係なく、値は変更されません。なぜだめですか?