本文整理汇总了C++中DviSubscription::RemoveRef方法的典型用法代码示例。如果您正苦于以下问题:C++ DviSubscription::RemoveRef方法的具体用法?C++ DviSubscription::RemoveRef怎么用?C++ DviSubscription::RemoveRef使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DviSubscription
的用法示例。
在下文中一共展示了DviSubscription::RemoveRef方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StopSubscriptions
void DviService::StopSubscriptions()
{
iLock.Wait();
for (TUint i=0; i<iSubscriptions.size(); i++) {
DviSubscription* subscription = iSubscriptions[i];
subscription->Stop();
iDvStack.SubscriptionManager().RemoveSubscription(*subscription);
subscription->RemoveRef();
}
iSubscriptions.clear();
iLock.Signal();
}
示例2: RemoveSubscription
void DviService::RemoveSubscription(const Brx& aSid)
{
iLock.Wait();
for (TUint i=0; i<iSubscriptions.size(); i++) {
DviSubscription* subscription = iSubscriptions[i];
if (subscription->Sid() == aSid) {
DviSubscriptionManager::RemoveSubscription(*subscription);
iSubscriptions.erase(iSubscriptions.begin() + i);
iLock.Signal();
subscription->RemoveRef();
return;
}
}
iLock.Signal();
}
示例3:
DviService::~DviService()
{
iLock.Wait();
TUint i=0;
for (; i<iSubscriptions.size(); i++) {
DviSubscription* subscription = iSubscriptions[i];
DviSubscriptionManager::RemoveSubscription(*subscription);
subscription->RemoveRef();
}
for (i=0; i<iDvActions.size(); i++) {
delete iDvActions[i].Action();
}
for (i=0; i<iProperties.size(); i++) {
delete iProperties[i];
}
iLock.Signal();
Stack::RemoveObject(this, "DviService");
}
示例4: Disable
void PropertyWriterFactory::Disable()
{
Stack::Mutex().Wait();
iEnabled = false;
Stack::Mutex().Signal();
iSubscriptionMapLock.Wait();
std::vector<DviSubscription*> subscriptions;
SubscriptionMap::iterator it = iSubscriptionMap.begin();
if (it != iSubscriptionMap.end()) {
DviSubscription* subscription = it->second;
if (subscription->TryAddRef()) {
subscriptions.push_back(subscription);
}
it++;
}
iSubscriptionMapLock.Signal();
for (TUint i=0; i<(TUint)subscriptions.size(); i++) {
DviSubscription* subscription = subscriptions[i];
subscription->Remove();
subscription->RemoveRef();
}
RemoveRef();
}