RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TComServer.ObjectCount Property

Indicates how many objects are currently dependent upon the server being loaded.

Pascal
property ObjectCount: Integer;
C++
__property int ObjectCount;

ObjectCount indicates when the server can be unloaded. ObjectCount contains the number of objects that are currently dependent upon the server.  

ObjectCount is incremented when new objects are created from class factories, and is decremented when objects are destroyed. 

When ObjectCount is zero the server can be unloaded. At this time, code written for the OnLastRelease event handler can process special actions after the last object is released and before the server shuts down. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!