//----------------------------------------------------------------------------------
	bool IResourcePtr::operator==(IResourcePtr& res) const{
		// check whenver given one is null
		if (res.isNull()){
			if (isNull())  return true;
			if (!isNull()) return false;
		}else{
			if (isNull())  return false;		
		}
		
		// check for holders
		ResourceHolder* A = getResourceHolder().get();
		ResourceHolder* B = res.getResourceHolder().get();
		if (A == B) return true;
		
		// At this point, both holders cannot be NULL
		if (A->getResource()->isResEmpty() || B->getResource()->isResEmpty()) return false;
		if (A->getResource() == B->getResource()) return true;
		
		return false;
	}
	//----------------------------------------------------------------------------------
	IResourcePtr::IResourcePtr(const IResourcePtr& resPtr){
		mHolder = resPtr.getResourceHolder();
	}