本文整理汇总了C++中LUMIX_DELETE函数的典型用法代码示例。如果您正苦于以下问题:C++ LUMIX_DELETE函数的具体用法?C++ LUMIX_DELETE怎么用?C++ LUMIX_DELETE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LUMIX_DELETE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:Fergus1986,项目名称:LumixEngine,代码行数:8,代码来源:physics_system.cpp
示例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();
}
开发者ID:badkangaroo,项目名称:LumixEngine,代码行数:11,代码来源:engine.cpp
示例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;
}
开发者ID:zemanmar,项目名称:LumixEngine,代码行数:52,代码来源:system.cpp
示例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;
}
开发者ID:xuxiaowei007,项目名称:LumixEngine,代码行数:13,代码来源:main_win.cpp
示例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;
}
开发者ID:xuxiaowei007,项目名称:LumixEngine,代码行数:15,代码来源:property_register.cpp
示例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;
}
开发者ID:zemanmar,项目名称:LumixEngine,代码行数:28,代码来源:plugin_manager.cpp
示例7: LUMIX_DELETE
PropertyGrid::~PropertyGrid()
{
for (auto* i : m_plugins)
{
LUMIX_DELETE(m_editor.getAllocator(), i);
}
}
开发者ID:PeaceSells50,项目名称:LumixEngine,代码行数:7,代码来源:property_grid.cpp
示例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);
}
}
开发者ID:whztt07,项目名称:LumixEngine,代码行数:34,代码来源:particle_system.cpp
示例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();
}
开发者ID:Fergus1986,项目名称:LumixEngine,代码行数:26,代码来源:shader.cpp
示例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);
}
开发者ID:badkangaroo,项目名称:LumixEngine,代码行数:16,代码来源:engine.cpp
示例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);
}
开发者ID:nem0,项目名称:LumixEngine,代码行数:7,代码来源:platform_interface.cpp
示例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);
}
开发者ID:marynate,项目名称:LumixEngine,代码行数:7,代码来源:profiler_ui.cpp
示例13:
~Instance()
{
Timer::destroy(timer);
for (auto* i : threads)
{
if (i != &main_thread) LUMIX_DELETE(allocator, i);
}
}
开发者ID:whztt07,项目名称:LumixEngine,代码行数:8,代码来源:profiler.cpp
示例14: LUMIX_DELETE
BaseEntry::~BaseEntry()
{
#if TYPE == MULTI_THREAD
LUMIX_DELETE(m_allocator, m_sync_event);
#endif //TYPE == MULTI_THREAD
}
开发者ID:ylyking,项目名称:LumixEngine,代码行数:8,代码来源:base_entry.cpp
示例15: LUMIX_DELETE
~FileSystemWatcherImpl()
{
if (task)
{
task->destroy();
LUMIX_DELETE(allocator, task);
}
}
开发者ID:Fergus1986,项目名称:LumixEngine,代码行数:8,代码来源:file_system_watcher.cpp
示例16: LUMIX_DELETE
BaseEntry::~BaseEntry()
{
#if !LUMIX_SINGLE_THREAD()
LUMIX_DELETE(m_allocator, m_sync_event);
#endif
}
开发者ID:gunsafighter,项目名称:LumixEngine,代码行数:8,代码来源:base_entry.cpp
示例17: LUMIX_DELETE
void OsFile::close()
{
if (nullptr != m_impl)
{
::CloseHandle(m_impl->m_file);
LUMIX_DELETE(m_impl->m_allocator, m_impl);
m_impl = nullptr;
}
}
开发者ID:gunsafighter,项目名称:LumixEngine,代码行数:9,代码来源:os_file.cpp
示例18: LUMIX_DELETE
bool Shader::generateInstances()
{
for (int i = 0; i < m_instances.size(); ++i)
{
LUMIX_DELETE(m_allocator, m_instances[i]);
}
m_instances.clear();
uint32 count = 1 << m_combintions.m_define_count;
auto* binary_manager = m_resource_manager.get(ResourceManager::SHADER_BINARY);
char basename[MAX_PATH_LENGTH];
PathUtils::getBasename(basename, sizeof(basename), getPath().c_str());
for (uint32 mask = 0; mask < count; ++mask)
{
ShaderInstance* instance = LUMIX_NEW(m_allocator, ShaderInstance)(*this);
m_instances.push(instance);
instance->m_define_mask = getDefineMaskFromDense(mask);
for (int pass_idx = 0; pass_idx < m_combintions.m_pass_count; ++pass_idx)
{
const char* pass = m_combintions.m_passes[pass_idx];
char path[MAX_PATH_LENGTH];
copyString(path, "shaders/compiled/");
catString(path, basename);
catString(path, "_");
catString(path, pass);
char mask_str[10];
int actual_mask = mask & m_combintions.m_vs_local_mask[pass_idx];
toCString(actual_mask, mask_str, sizeof(mask_str));
catString(path, mask_str);
catString(path, "_vs.shb");
Path vs_path(path);
auto* vs_binary = static_cast<ShaderBinary*>(binary_manager->load(vs_path));
addDependency(*vs_binary);
instance->m_binaries[pass_idx * 2] = vs_binary;
copyString(path, "shaders/compiled/");
catString(path, basename);
catString(path, "_");
catString(path, pass);
actual_mask = mask & m_combintions.m_fs_local_mask[pass_idx];
toCString(actual_mask, mask_str, sizeof(mask_str));
catString(path, mask_str);
catString(path, "_fs.shb");
Path fs_path(path);
auto* fs_binary = static_cast<ShaderBinary*>(binary_manager->load(fs_path));
addDependency(*fs_binary);
instance->m_binaries[pass_idx * 2 + 1] = fs_binary;
}
}
return true;
}
开发者ID:Ghost-yc,项目名称:LumixEngine,代码行数:57,代码来源:shader.cpp
示例19: while
~Block()
{
while (m_first_child)
{
Block* child = m_first_child->m_next;
LUMIX_DELETE(allocator, m_first_child);
m_first_child = child;
}
}
开发者ID:whztt07,项目名称:LumixEngine,代码行数:9,代码来源:profiler.cpp
示例20: setMaterial
ParticleEmitter::~ParticleEmitter()
{
setMaterial(nullptr);
for (auto* module : m_modules)
{
LUMIX_DELETE(m_allocator, module);
}
}
开发者ID:whztt07,项目名称:LumixEngine,代码行数:9,代码来源:particle_system.cpp
注:本文中的LUMIX_DELETE函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论