> As an aside, for those of you who have used interfaces, do you think
> Borland's implementation can do with a bit of improvement.  I mean wouldn't
> it be better to have a garbage collector rather than use the addref /
> release mechanism, which BTW, calls an expensive kernel API to increment /
> decrement the reference count.  So here is another tip - if you don't need
> your implementation classes to be thread safe, you can override AddRef and
> Release to bypass the use of the kernel api calls - its faster.

issues exist also in replacing the direct release on last reference with the garbage
collection...

1. The garbage collection is unpredictable and so machine resources are harder
  to manage in resource starved environments.
2. Garbage collection is often driven in a separate thread via idle monitoring -
  since most resource use is during intense processing, resource recovery will
  not begin until after such processing (which may not be in time to release
  resources)...
3. Issues of thread safety in existing VCL code may incur impractical costs in
  implementing a garbage collector under the current delphi implementation.

--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to