On 11 Dec 2005, at 22:00, L505 wrote:

Where is the "reference count" actually stored anyway, and who as access to the reference count - just the dll/exe who created the string, or is it accessible by
both of them? I do need to learn more about reference count science.

The reference count is part of the ansistring itself. An ansistring is simply a pointer to a record containing a reference count, the amount of memory currently allocated for the string (i.e., maximum length -1) and the string itself (a 0-terminated string).

So when passing a string from a dll to somewhere else, its reference count is passed along with it.


Jonas
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to