<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Am 20.03.2013 15:35, schrieb Xiangrong
Fang:<br>
</div>
<blockquote
cite="mid:CAP93jB2Tp3DASFc9Hc-okwN7PBbALcMw2onwnpi+Z66346WKDw@mail.gmail.com"
type="cite">OK, What confused me is the description found in FPC
manual saying:<br>
<p><var>TInterfacedObject</var> is a descendent of <a
moz-do-not-send="true"
href="http://www.freepascal.org/docs-html/rtl/system/tobject.html">TObject</a>
which implements the <a moz-do-not-send="true"
href="http://www.freepascal.org/docs-html/rtl/system/iunknown.html">IUnknown</a>
interface. It can be used as a base class for all classes which
need reference counting. </p>
in another word, reference counting is a feature of
TInterfacedObject, or the AfterConstruction/BeforeDestruction
methods?? it sounds like non-descedants of TInterfacedObject are
not reference counted??<br>
</blockquote>
No, the reference counting is a feature of IUnknown (or any
descendant of it) and is only used if you work with the interface
and not the class type. You can implement the IUnknown (or
IInterface) interface yourself as well.<br>
<br>
Regards,<br>
Sven<br>
</body>
</html>