Example #1
0
__fastcall DZRawData::DZRawData(const DZRawData& other)
{
    imp = NULL;
    if (!other.IsEmpty())
    {
        imp = other.imp;
        IncRefs();
    }
}
Example #2
0
DZRawData& __fastcall DZRawData::operator=(const DZRawData& other)
{
    if (this != &other)
    {
        Release();
        if (!other.IsEmpty())
        {
            imp = other.imp;
            IncRefs();
        }
    }
    return *this;
}
Example #3
0
void AmSafeDelete::Delete()
{
	if (fRefCount <= 0) {
		// If nobody else has a reference on this event, it is
		// safe to just delete it.
		RealDelete();
	} else {
		// Otherwise, set the mDeleted flag, avoiding any race
		// conditions with other threads that might have references.
		IncRefs();
		fDeleted = 1;
		DecRefs();
	}
}
Example #4
0
void AmSafeDelete::Undelete()
{
	IncRefs();
	fDeleted = 0;
	DecRefs();
}