本文整理汇总了C++中LUMIX_DELETE函数的典型用法代码示例。如果您正苦于以下问题:C++ LUMIX_DELETE函数的具体用法?C++ LUMIX_DELETE怎么用?C++ LUMIX_DELETE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LUMIX_DELETE函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LUMIX_DELETE
void PhysicsSystemImpl::destroy()
{
m_cooking->release();
m_physics->release();
m_foundation->release();
LUMIX_DELETE(m_allocator, m_physx_allocator);
LUMIX_DELETE(m_allocator, m_error_callback);
}
示例2: destroyUniverse
void destroyUniverse(UniverseContext& context) override
{
for (int i = context.m_scenes.size() - 1; i >= 0; --i)
{
context.m_scenes[i]->getPlugin().destroyScene(context.m_scenes[i]);
}
LUMIX_DELETE(m_allocator, context.m_universe);
LUMIX_DELETE(m_allocator, &context);
m_resource_manager.removeUnreferenced();
}
示例3: createProcess
Process* createProcess(const char* cmd, const char* args, IAllocator& allocator)
{
auto* process = LUMIX_NEW(allocator, Process)(allocator);
SECURITY_ATTRIBUTES sec_attrs;
sec_attrs.nLength = sizeof(SECURITY_ATTRIBUTES);
sec_attrs.bInheritHandle = TRUE;
sec_attrs.lpSecurityDescriptor = NULL;
if (CreatePipe(&process->output_read_pipe, &process->output_write_pipe, &sec_attrs, 0) ==
FALSE)
{
LUMIX_DELETE(allocator, process);
return nullptr;
}
if (SetHandleInformation(process->output_read_pipe, HANDLE_FLAG_INHERIT, 0) == FALSE)
{
LUMIX_DELETE(allocator, process);
return nullptr;
}
STARTUPINFO suinfo;
ZeroMemory(&suinfo, sizeof(suinfo));
suinfo.cb = sizeof(suinfo);
suinfo.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES;
suinfo.wShowWindow = SW_HIDE;
suinfo.hStdOutput = process->output_write_pipe;
suinfo.hStdError = process->output_write_pipe;
char rw_args[1024];
copyString(rw_args, args);
auto create_process_ret = CreateProcess(
cmd,
rw_args,
NULL,
NULL,
TRUE,
NORMAL_PRIORITY_CLASS,
NULL,
NULL,
&suinfo,
&process->process_info);
if (create_process_ret == FALSE)
{
LUMIX_DELETE(allocator, process);
return nullptr;
}
CloseHandle(process->output_write_pipe);
return process;
}
示例4: shutdown
void shutdown()
{
m_engine->destroyUniverse(*m_universe);
Lumix::FS::FileSystem::destroy(m_file_system);
LUMIX_DELETE(m_allocator, m_disk_file_device);
LUMIX_DELETE(m_allocator, m_mem_file_device);
LUMIX_DELETE(m_allocator, m_pack_file_device);
Lumix::Pipeline::destroy(m_pipeline);
Lumix::Engine::destroy(m_engine, m_allocator);
m_engine = nullptr;
m_pipeline = nullptr;
m_universe = nullptr;
}
示例5: shutdown
void shutdown()
{
for (int j = 0; j < g_properties->size(); ++j)
{
Array<IPropertyDescriptor*>& props = g_properties->at(j);
for (auto* prop : props)
{
LUMIX_DELETE(*g_allocator, prop);
}
}
LUMIX_DELETE(*g_allocator, g_properties);
g_properties = nullptr;
g_allocator = nullptr;
}
示例6: load
IPlugin* load(const char* path) override
{
g_log_info.log("plugins") << "loading plugin " << path;
typedef IPlugin* (*PluginCreator)(Engine&);
auto* lib = loadLibrary(path);
if (lib)
{
PluginCreator creator = (PluginCreator)getLibrarySymbol(lib, "createPlugin");
if (creator)
{
IPlugin* plugin = creator(m_engine);
if (!plugin || !plugin->create())
{
LUMIX_DELETE(m_engine.getAllocator(), plugin);
ASSERT(false);
return nullptr;
}
m_plugins.push(plugin);
m_libraries.push(lib);
m_library_loaded.invoke(lib);
g_log_info.log("plugins") << "plugin loaded";
return plugin;
}
}
unloadLibrary(lib);
return 0;
}
示例7: LUMIX_DELETE
PropertyGrid::~PropertyGrid()
{
for (auto* i : m_plugins)
{
LUMIX_DELETE(m_editor.getAllocator(), i);
}
}
示例8: lengthOf
void ParticleEmitter::deserialize(InputBlob& blob, ResourceManager& manager, bool has_version)
{
int version = (int)ParticleEmitterVersion::INVALID;
if (has_version)
{
blob.read(version);
if (version > (int)ParticleEmitterVersion::SPAWN_COUNT) blob.read(m_spawn_count);
}
blob.read(m_spawn_period);
blob.read(m_initial_life);
blob.read(m_initial_size);
blob.read(m_entity);
char path[MAX_PATH_LENGTH];
blob.readString(path, lengthOf(path));
auto material_manager = manager.get(ResourceManager::MATERIAL);
auto material = static_cast<Material*>(material_manager->load(Lumix::Path(path)));
setMaterial(material);
int size;
blob.read(size);
for (auto* module : m_modules)
{
LUMIX_DELETE(m_allocator, module);
}
m_modules.clear();
for (int i = 0; i < size; ++i)
{
uint32 type;
blob.read(type);
auto* module = createModule(type, *this);
m_modules.push(module);
module->deserialize(blob, version);
}
}
示例9: LUMIX_DELETE
void Shader::unload(void)
{
m_combintions = {};
for (auto& uniform : m_uniforms)
{
bgfx::destroyUniform(uniform.handle);
}
m_uniforms.clear();
for (int i = 0; i < m_texture_slot_count; ++i)
{
if (bgfx::isValid(m_texture_slots[i].uniform_handle))
{
bgfx::destroyUniform(m_texture_slots[i].uniform_handle);
}
m_texture_slots[i].uniform_handle = BGFX_INVALID_HANDLE;
}
m_texture_slot_count = 0;
for (auto* i : m_instances)
{
LUMIX_DELETE(m_allocator, i);
}
m_instances.clear();
}
示例10: LUMIX_DELETE
~EngineImpl()
{
Timer::destroy(m_timer);
Timer::destroy(m_fps_timer);
PluginManager::destroy(m_plugin_manager);
if (m_input_system) InputSystem::destroy(*m_input_system);
if (m_disk_file_device)
{
FS::FileSystem::destroy(m_file_system);
LUMIX_DELETE(m_allocator, m_mem_file_device);
LUMIX_DELETE(m_allocator, m_disk_file_device);
}
m_resource_manager.destroy();
MTJD::Manager::destroy(*m_mtjd_manager);
}
示例11: destroyProcess
void destroyProcess(Process& process)
{
CloseHandle(process.output_read_pipe);
CloseHandle(process.process_info.hProcess);
CloseHandle(process.process_info.hThread);
LUMIX_DELETE(process.allocator, &process);
}
示例12: LUMIX_DELETE
~ProfilerUIImpl()
{
m_allocation_root->clear(m_allocator);
LUMIX_DELETE(m_allocator, m_allocation_root);
Lumix::Profiler::getFrameListeners().unbind<ProfilerUIImpl, &ProfilerUIImpl::onFrame>(this);
Lumix::Timer::destroy(m_timer);
}
示例13:
~Instance()
{
Timer::destroy(timer);
for (auto* i : threads)
{
if (i != &main_thread) LUMIX_DELETE(allocator, i);
}
}
示例14: LUMIX_DELETE
BaseEntry::~BaseEntry()
{
#if TYPE == MULTI_THREAD
LUMIX_DELETE(m_allocator, m_sync_event);
#endif //TYPE == MULTI_THREAD
}
示例15: LUMIX_DELETE
~FileSystemWatcherImpl()
{
if (task)
{
task->destroy();
LUMIX_DELETE(allocator, task);
}
}