本文整理汇总了C++中ReleaseMemory函数的典型用法代码示例。如果您正苦于以下问题:C++ ReleaseMemory函数的具体用法?C++ ReleaseMemory怎么用?C++ ReleaseMemory使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ReleaseMemory函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: gHyp_hyp_delete
void gHyp_hyp_delete ( sHyp * pHyp )
{
/* Description:
*
* Delete the HyperScript program.
*
* Arguments:
*
* pHyp [R]
* - pointer to sHyp program object
*
* Return value:
*
* none
*
*/
/* Free the block of code */
ReleaseMemory ( pHyp->pCode ) ;
/* Free the program */
ReleaseMemory ( pHyp ) ;
return ;
}
示例2: for_each
void GmJobItem::CopyItem (const GmJobItem & item)
{
szName = item.szName;
szDest = item.szDest;
szDesc = item.szDesc;
szPass = item.szPass;
Time = item.Time;
SplitSize = item.SplitSize;
MergeTimes = item.MergeTimes;
DeflateType = item.DeflateType;
EncryptType = item.EncryptType;
for_each (vpSources.begin (), vpSources.end (), ReleaseMemory ());
vpSources.clear ();
for (size_t index = 0; index < item.vpSources.size (); ++index)
AddSource (item.vpSources[index]->szPath, item.vpSources[index]->Options);
Filter = item.Filter;
for_each (vpPlans.begin (), vpPlans.end (), ReleaseMemory ());
vpPlans.clear ();
for (size_t index = 0; index < item.vpPlans.size (); ++index)
AddPlan (*item.vpPlans[index]);
Options = item.Options;
}
示例3: Destroy
CThreadPool::~CThreadPool()
{
Destroy();
ReleaseMemory();
DeleteCriticalSection(&m_csFuncList);
DeleteCriticalSection(&m_csThreads);
}
示例4: GetDIBits
HRESULT CAviFile::AppendFrameUsual(HBITMAP hBitmap, int Count)
{
BITMAPINFO bmpInfo;
bmpInfo.bmiHeader.biBitCount=0;
bmpInfo.bmiHeader.biSize=sizeof(BITMAPINFOHEADER);
GetDIBits(m_hAviDC,hBitmap,0,0,NULL,&bmpInfo,DIB_RGB_COLORS);
bmpInfo.bmiHeader.biCompression=BI_RGB;
GetDIBits(m_hAviDC,hBitmap,0,bmpInfo.bmiHeader.biHeight,m_lpBits,&bmpInfo,DIB_RGB_COLORS);
while( Count > 0 )
{
if(FAILED(AVIStreamWrite(m_pAviCompressedStream,m_lSample++,1,m_lpBits,bmpInfo.bmiHeader.biSizeImage,0,NULL,NULL)))
{
SetErrorMessage(_T("Unable to Write Video Stream to the output Movie File"));
ReleaseMemory();
m_LastError = E_FAIL;
return E_FAIL;
}
--Count;
}
return S_OK;
}
示例5: Delete
BOOL CDrawGraph::Add(LPCTSTR pName, DWORD dwTime, DWORD dwValue, COLORREF rgbLine, HICON hIcon)
{
// Use current time if not supplied
if ( dwTime == 0 ) dwTime = GetTickCount();
// Get the memory
LPGRAPHELEMENTINFO pgei = (LPGRAPHELEMENTINFO)Find( pName );
if ( pgei == NULL )
{
// Create new list entry
pgei = (LPGRAPHELEMENTINFO)New( NULL, 0, pName );
if ( pgei == NULL ) return TRUE;
} // end if
if ( hIcon == NULL )
{
pgei->type = 1;
// Allocate memory
if ( !AllocateMemory( pgei, m_dwGraphSize ) )
{ Delete( pgei ); return FALSE; }
// Don't overflow
if ( pgei->validpts > pgei->pts ) pgei->validpts = pgei->pts;
// Make some room
if ( pgei->validpts > 0 )
for ( DWORD i = pgei->validpts - 1; i > 0; i-- )
{ pgei->ppts[ i ] = pgei->ppts[ i - 1 ];
pgei->ptimes[ i ] = pgei->ptimes[ i - 1 ];
} // end for
// Save data
pgei->ppts[ 0 ] = dwValue;
pgei->ptimes[ 0 ] = dwTime;
pgei->rgbline = rgbLine;
// Increment valid point counter
if ( pgei->validpts < pgei->pts ) pgei->validpts++;
} // end if
else
{
pgei->type = 2;
// Don't need any point memory
ReleaseMemory( pgei );
// Save icon and time
pgei->icon = hIcon;
pgei->time = dwTime;
} // end else
return TRUE;
}
示例6: ReleaseMemory
void CDrawGraph::DeleteObject(void *node)
{
LPGRAPHELEMENTINFO pgei = (LPGRAPHELEMENTINFO)node;
if ( pgei == NULL ) return;
ReleaseMemory( pgei );
CHList::DeleteObject( node );
}
示例7: ReleaseMemory
void AEGetLaunchTokenRequest::inflateValues(uint32_t measurementLength,const uint8_t* measurement,
uint32_t sigstructLength,const uint8_t* sigstruct,
uint32_t attributesLength,const uint8_t* attributes,
uint32_t timeout)
{
ReleaseMemory();
CopyFields(measurementLength, measurement, sigstructLength, sigstruct, attributesLength, attributes, timeout);
}
示例8: ReleaseMemory
//代入演算子でコピー
rxShapeMatching& rxShapeMatching::operator=(const rxShapeMatching& copy)
{
if(this != ©){
ReleaseMemory();
Copy(copy);
}
return *this;
}
示例9: ReleaseMemory
void D3D9Texture::FreeMemory()
{
ReleaseMemory();
if(_SurfacePlain != NULL)
{
D3DValidateRelease(_SurfacePlain);
_SurfacePlain = NULL;
}
_RenderTarget = false;
}
示例10: ReleaseMemory
bool AEGetQuoteResponse::inflateWithMessage(AEMessage* message)
{
aesm::message::Response msg;
msg.ParseFromArray(message->data, message->size);
if (msg.has_getquoteres() == false)
return false;
ReleaseMemory();
m_response = new aesm::message::Response::GetQuoteResponse(msg.getquoteres());
return true;
}
示例11: OnExit
void
OnExit (void)
{
ReleaseMemory ();
ReleaseFatInfo ();
setcbrk (SavedCBreak);
SynchronizeLFNs ();
CROSSCUT_NLS_CLOSE
}
示例12: ReleaseMemory
bool AEInitQuoteResponse::inflateWithMessage(AEMessage* message)
{
aesm::message::Response msg;
msg.ParseFromArray(message->data, message->size);
if (msg.has_initquoteres() == false)
return false;
//this is an AEGetLaunchTokenResponse
ReleaseMemory();
m_response = new aesm::message::Response::InitQuoteResponse(msg.initquoteres());
return true;
}
示例13: ReleaseMemory
bool AECloseSessionResponse::inflateWithMessage(AEMessage* message)
{
aesm::message::Response msg;
msg.ParseFromArray(message->data, message->size);
if (msg.has_closesessionres() == false)
return false;
//this is an AECloseSessionResponse
ReleaseMemory();
m_response = new aesm::message::Response::CloseSessionResponse(msg.closesessionres());
return true;
}
示例14: ReleaseMemory
bool AESGXSwitchExtendedEpidGroupResponse::inflateWithMessage(AEMessage* message)
{
aesm::message::Response msg;
msg.ParseFromArray(message->data, message->size);
if (msg.has_sgxswitchextendedepidgroupres() == false)
return false;
//this is an AESGXSwitchExtendedEpidGroupResponse
ReleaseMemory();
m_response = new aesm::message::Response::SGXSwitchExtendedEpidGroupResponse(msg.sgxswitchextendedepidgroupres());
return true;
}
示例15: ReleaseMemory
bool AEGetPsCapResponse::inflateWithMessage(AEMessage* message)
{
aesm::message::Response msg;
if (!msg.ParseFromArray(message->data, message->size))
return false;
if (msg.has_getpscapres() == false)
return false;
//this is an AEGetPsCapResponse
ReleaseMemory();
m_response = new aesm::message::Response::GetPsCapResponse(msg.getpscapres());
return true;
}