On 11 Dec 2005, at 14:51, L505 wrote:

I apologize, I should have said that you'd not have exactly the same problems with returning a string - they are different problems but the basic point and idea remains the same: no matter what you do, strings will cause problems. What I should have said was there would still be all sorts of problems with returning a string - not necessarily the reference count problem, but other issues that cause similar havoc, such as two memory managers not communicating with each other. There are so many problems to consider, that a programmer once again spends more time thinking about the possible problems instead of programming a solution that works reliably.

I still have not seen a single actual problem mentioned with an explanation by what exactly it is caused, only vague hand waving warning for strange and inexplicable problems. I'm really interested by what these problems are and can be caused. Does every dll have its own memory manager data structures and is indeed the problem that memory allocated by one is free "to" another (as I described in my previous mail)?

That would seem very strange to me though, since this could be easily solved by making the RTL/system unit a dynamically linked library and linking all other libraries to that (so there is only one system unit with only one memory manager).

Or is it something else?


Jonas
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to