本文整理汇总了C++中OsclMemAllocator::deallocate方法的典型用法代码示例。如果您正苦于以下问题:C++ OsclMemAllocator::deallocate方法的具体用法?C++ OsclMemAllocator::deallocate怎么用?C++ OsclMemAllocator::deallocate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OsclMemAllocator
的用法示例。
在下文中一共展示了OsclMemAllocator::deallocate方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LOGV
OSCL_EXPORT_REF AndroidAudioStream::~AndroidAudioStream()
{
LOGV("destructor");
// cleanup active timing object
if (iActiveTiming) {
iActiveTiming->~AndroidAudioMIOActiveTimingSupport();
OsclMemAllocator alloc;
alloc.deallocate(iActiveTiming);
}
}
示例2: setURI
////// INetURI implementation
////////////////////////////////////////////////////////////////////////////////////
bool INetURI::setURI(OSCL_wString &aUri, const bool aRedirectURI)
{
if (aUri.get_size() == 0) return false;
OsclMemAllocator alloc;
char *buf = (char*)alloc.allocate(aUri.get_size() + 1);
if (!buf) return false;
uint32 size = oscl_UnicodeToUTF8(aUri.get_cstr(), aUri.get_size(), buf, aUri.get_size() + 1);
if (size == 0)
{
alloc.deallocate(buf);
return false;
}
iURI = OSCL_HeapString<OsclMemAllocator> (buf, size);
alloc.deallocate(buf);
// clear iHost
iHostName.set(NULL, 0);
iRedirectURI = aRedirectURI;
return true;
}
开发者ID:Katarzynasrom,项目名称:patch-hosting-for-android-x86-support,代码行数:22,代码来源:pvmf_protocol_engine_common.cpp
示例3: destruct_and_dealloc
virtual void destruct_and_dealloc(OsclAny* ptr)
{
uint8* tmp_ptr = (uint8*) ptr;
uint aligned_refcnt_size =
oscl_mem_aligned_size(sizeof(OsclRefCounterSA<MediaCmdCleanupSA>));
tmp_ptr += aligned_refcnt_size;
PVMFMediaCmd* mcmd_ptr = reinterpret_cast<PVMFMediaCmd*>(tmp_ptr);
mcmd_ptr->~PVMFMediaCmd();
OsclMemAllocator alloc;
alloc.deallocate(ptr);
}
示例4: Delete
OSCL_EXPORT_REF void CPVInterfaceProxy::Delete()
//called under app thread context
{
Oscl_DefAlloc *alloc = this->iAlloc;
bool default_alloc = (this->iAlloc == &this->iDefAlloc);
this->~CPVInterfaceProxy();
if (default_alloc)
{
OsclMemAllocator defalloc;
defalloc.deallocate(this);
}
else
{
alloc->deallocate(this);
}
}
示例5: releaseParameters
PVMFStatus PVMFSocketPort::releaseParameters(PvmiMIOSession aSession,
PvmiKvp* aParameters,
int num_elements)
{
OSCL_UNUSED_ARG(aSession);
PVLOGGER_LOGMSG(PVLOGMSG_INST_MLDBG, iLogger, PVLOGMSG_INFO, (0, "PVMFSocketPort::releaseParameters: aSession=0x%x, aParameters=0x%x, num_elements=%d",
aSession, aParameters, num_elements));
if ((num_elements != 1) ||
(pv_mime_strcmp(aParameters->key, PVMI_PORT_CONFIG_INPLACE_DATA_PROCESSING_VALUE) != 0))
{
PVLOGGER_LOGMSG(PVLOGMSG_INST_MLDBG, iLogger, PVLOGMSG_ERR, (0, "PVMFSocketPort::releaseParameters: Error - Not a PvmiKvp created by this port"));
return PVMFFailure;
}
OsclMemAllocator alloc;
alloc.deallocate((OsclAny*)(aParameters));
return PVMFSuccess;
}