本文整理汇总了C++中UserHeapPtr::Free方法的典型用法代码示例。如果您正苦于以下问题:C++ UserHeapPtr::Free方法的具体用法?C++ UserHeapPtr::Free怎么用?C++ UserHeapPtr::Free使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserHeapPtr
的用法示例。
在下文中一共展示了UserHeapPtr::Free方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: destroy
void SensorSystemManager::destroy (void) {
if (sensorPool)
{
for (long i = 0; i < MAX_SENSORS; i++)
{
delete sensorPool[i];
sensorPool[i] = NULL;
}
missionHeap->Free(sensorPool);
sensorPool = NULL;
}
freeSensors = 0;
freeList = NULL;
for (long i = 0; i < Team::numTeams; i++)
{
delete teamSensors[i];
teamSensors[i] = NULL;
}
if (SensorSystem::sortList)
{
delete SensorSystem::sortList;
SensorSystem::sortList = NULL;
}
}
示例2: destroy
void GoalManager::destroy (void) {
if (goalObjectPool) {
missionHeap->Free(goalObjectPool);
goalObjectPool = NULL;
}
numGoalObjects = 0;
goalObjectPoolSize = 0;
}
示例3: delete
void GameDebugWindow::operator delete(PVOID us)
{
systemHeap->Free(us);
}
示例4: delete
void SensorSystem::operator delete (void* us) {
missionHeap->Free(us);
}
示例5: delete
void GoalObject::operator delete (void* us) {
missionHeap->Free(us);
}
示例6: InitializeGameEngine
//.........这里部分代码省略.........
gammaLevel = 0;
// store volume settings in global variable since soundsystem
// does not exist yet. These will be set in SoundSystem::init()
result = prefs->readIdLong("DigitalMasterVolume", DigitalMasterVolume);
if(result != NO_ERROR)
DigitalMasterVolume = 255;
result = prefs->readIdLong("MusicVolume", MusicVolume);
if(result != NO_ERROR)
MusicVolume = 64;
result = prefs->readIdLong("RadioVolume", RadioVolume);
if(result != NO_ERROR)
RadioVolume = 64;
result = prefs->readIdLong("SFXVolume", sfxVolume);
if(result != NO_ERROR)
sfxVolume = 64;
result = prefs->readIdFloat("DoubleClickThreshold", doubleClickThreshold);
if(result != NO_ERROR)
doubleClickThreshold = 0.2f;
result = prefs->readIdLong("DragThreshold", dragThreshold);
if(result != NO_ERROR)
dragThreshold = .016667;
result = prefs->readIdULong("BaseVertexColor", BaseVertexColor);
if(result != NO_ERROR)
BaseVertexColor = 0x00000000;
result = prefs->readIdBoolean("FullScreen", fullScreen);
if(result != NO_ERROR)
fullScreen = true;
result = prefs->readIdLong("Rasterizer", renderer);
if(result != NO_ERROR)
renderer = 0;
if((renderer < 0) || (renderer > 3))
renderer = 0;
}
}
prefs->close();
delete prefs;
prefs = nullptr;
//-------------------------------
// Used to output debug stuff!
// Mondo COOL!
// simply do this in the code and stuff goes to the file called mc2.output
// DEBUG_STREAM << thing_you_want_to_output
//
// IMPORTANT NOTE:
Stuff::InitializeClasses();
MidLevelRenderer::InitializeClasses(8192 * 4, 1024, 0, 0, true);
gosFX::InitializeClasses();
gos_PushCurrentHeap(MidLevelRenderer::Heap);
MidLevelRenderer::TGAFilePool* pool = new MidLevelRenderer::TGAFilePool("data\\Effects\\");
MidLevelRenderer::MLRTexturePool::Instance = new MidLevelRenderer::MLRTexturePool(pool);
MidLevelRenderer::MLRSortByOrder* cameraSorter = new MidLevelRenderer::MLRSortByOrder(MidLevelRenderer::MLRTexturePool::Instance);
theClipper = new MidLevelRenderer::MLRClipper(0, cameraSorter);
gos_PopCurrentHeap();
//------------------------------------------------------
// Start the GOS FX.
gos_PushCurrentHeap(gosFX::Heap);
gosFX::EffectLibrary::Instance = new gosFX::EffectLibrary();
Check_Object(gosFX::EffectLibrary::Instance);
FullPathFileName effectsName;
effectsName.init(effectsPath, "mc2.fx", "");
File effectFile;
int32_t result = effectFile.open(effectsName);
if(result != NO_ERROR)
STOP(("Could not find MC2.fx"));
int32_t effectsSize = effectFile.fileSize();
puint8_t effectsData = (puint8_t)systemHeap->Malloc(effectsSize);
effectFile.read(effectsData, effectsSize);
effectFile.close();
effectStream = new Stuff::MemoryStream(effectsData, effectsSize);
gosFX::EffectLibrary::Instance->Load(effectStream);
gosFX::LightManager::Instance = new gosFX::LightManager();
gos_PopCurrentHeap();
systemHeap->Free(effectsData);
//------------------------------------------------
// Fire up the MC Texture Manager.
mcTextureManager = new MC_TextureManager;
mcTextureManager->start();
//Startup the vertex array pool
mcTextureManager->startVertices(500000);
//--------------------------------------------------
// Setup Mouse Parameters from Prefs.CFG
userInput = new UserInput;
userInput->init();
userInput->setMouseDoubleClickThreshold(doubleClickThreshold);
userInput->setMouseDragThreshold(dragThreshold);
userInput->initMouseCursors("cursors");
userInput->setMouseCursor(mState_NORMAL);
userInput->mouseOn();
// now the sound system
soundSystem = new GameSoundSystem;
soundSystem->init();
((SoundSystem*)soundSystem)->init("sound");
sndSystem = soundSystem; // for things in the lib that use sound
soundSystem->playDigitalMusic(LOGISTICS_LOOP);
pLogData = new LogisticsData;
pLogData->init();
pMechlopedia = new Mechlopedia;
pMechlopedia->init();
pMechlopedia->begin();
}
示例7: delete
void TeamSensorSystem::operator delete(PVOID us)
{
missionHeap->Free(us);
}
示例8: delete
void MultiPlayer::operator delete(PVOID us)
{
systemHeap->Free(us);
}