예제 #1
0
bool TransportHandlerFile::ShutdownJob(TransportInfo* pTInfo, bool& bStateComplete)
{
    if(pTInfo != NULL && pTInfo->mTransportHandlerData)
    {
        Disconnect(pTInfo, bStateComplete);

        FileInfo*  pFileInfo  = (FileInfo*)pTInfo->mTransportHandlerData;
        Allocator* pAllocator = GetAllocator();

        pFileInfo->~FileInfo();
        pAllocator->Free(pFileInfo, sizeof(FileInfo));

        pTInfo->mTransportHandlerData = 0;
        sFileOpenJobCount--;

        #ifdef EA_DEBUG
            mJobCount--;
        #endif
    
    }
    if(sFileOpenJobCount <= 0)
        RemoveFileDownloadBuffer();

    bStateComplete = true;
    return true;
}
예제 #2
0
 void reset( int maxSize ) {
     l = 0;
     if ( maxSize && size > maxSize ) {
         al.Free(data);
         data = (char*)al.Malloc(maxSize);
         assert(data);
         size = maxSize;
     }
 }
예제 #3
0
 void kill() {
     if ( data ) {
         al.Free(data);
         data = 0;
     }
 }