title: VB6 and Delphi - TStringList is free by VB
body: <p>I have the following situation:
  An object is instantiated in VB6 using OCX made ​​in Delphi.
  when I</p>
  
  <pre><code>...
  Dim x As New spdComponent
  Set x = spdComponent.ConverterType (XML)
  count = x.item.count
  TXT = ""
  ...
  </code></pre>
  
  <p>Count receives the value of all items of the TStringList OCX correctly, but soon the line below, where TXT gets empty, the value of 'x.item.cout' is lost.
  When I debug in Delphi, in reality what happens is a TStringList be released from memory, but this happens without any sense (it seems that there is a conflict of interest between Delphi and VB).
  Searching here and on google, I saw that many commented about not using TStringList but PChar, it would be a more appropriate way of working, but the question remains as to make use of C # 2005 and the same OCX, the problem is not occurs. (as in other languages​​, only in VB 6, so far).</p>
  
  <p>Well, I have evidence that the VB kills the object (TStrinList) because for him, that object is not longer necessary, but it does.
  One strange thing that happens is, if I</p>
  
  <pre><code>count = spdComponent.ConverterType(XML).item.count
  </code></pre>
  
  <p>It's work, do all the necessary processes without any error, but that first case, the error still remains.</p>
  
  <p>Has anyone encountered similar problems?</p>
  
  <p>Thanks guys, anyone who can give me a hand ... will be grateful</p>