Table 1-2 KcsShareable
| Public Member | Description |
| virtual KcsShareable *attach( long howMany = 1,
KcsAttachType aAttachFlag = KcsAttMem, KcsStatus *aStatus = NULL);
| Use this method when you want to share an object already allocated. It returns a pointer to the shared object. All shared objects must dettach() instead of using delete. aAttachFlag and aStatus are only used with the KcsLoadable class override. |
| void dettach(long howMany = 1, KcsAttachType aDettachFlag = KcsAttMem, KcsStatus *aStatus = NULL); | Deletes an object. The actual deallocation only happens when no other object is sharing this object. aDettachFlag and aStatus are only used with the KcsLoadable class override. |
| static long getGlobalCount(); | Returns the total number of objects sharing any other objects in the system. Use for debugging. |
| long getUseCount() {return(useCount);}; | Returns the current number of objects sharing this
object. Use for debugging. |
| KcsShareable(KcsStatus *status, long nUse = 1); | Constructor. |