Exemple #1
0
__fastcall DZRawData::DZRawData(const DZRawData& other)
{
    imp = NULL;
    if (!other.IsEmpty())
    {
        imp = other.imp;
        IncRefs();
    }
}
Exemple #2
0
DZRawData& __fastcall DZRawData::operator=(const DZRawData& other)
{
    if (this != &other)
    {
        Release();
        if (!other.IsEmpty())
        {
            imp = other.imp;
            IncRefs();
        }
    }
    return *this;
}
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();
	}
}
void AmSafeDelete::Undelete()
{
	IncRefs();
	fDeleted = 0;
	DecRefs();
}