<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 24.09.2013 11:53, schrieb Xiangrong
      Fang:<br>
    </div>
    <blockquote
cite="mid:CAP93jB3YV3uQf8FG8BC_hHWRs4A4fq4gO-TktSLCNVFgPvd-EQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="h5"><br>
        </div>
        <div class="gmail_extra">
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">
              <div text="#000000" bgcolor="#FFFFFF"> But it's not a good
                idea as you'd still need to convert Data to a TObject
                (e.g. by using a cast), but that will fail if Data is
                something else than a pointer-like type...<br>
                <br>
              </div>
            </blockquote>
            <div>This worked in my TTree class (destructor):<br>
              <br>
                if PTypeInfo(TypeInfo(Data))^.Kind = tkObject then
              TObject(Data).Free; <br>
              <br>
            </div>
            <div>I don't know in what case it will fail? I tested with a
              TStringTree, could you please give an example that it will
              fail?<br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    Try something that is not a Pointer, e.g. a Shortstring, a record,
    or an ordinal datatype like QWord.<br>
    <br>
    Regards,<br>
    Sven<br>
  </body>
</html>