Skip to content

Commit

Permalink
fix: memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
mehah committed Mar 2, 2023
1 parent d3e727e commit 4de4689
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/framework/graphics/drawpool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ DrawPool* DrawPool::create(const DrawPoolType type)
{
DrawPool* pool = new DrawPool;
if (type == DrawPoolType::MAP || type == DrawPoolType::FOREGROUND) {
pool = new DrawPool;

pool->m_framebuffer = std::make_shared<FrameBuffer>();
pool->m_framebuffer->m_isScene = true;

Expand All @@ -42,9 +40,6 @@ DrawPool* DrawPool::create(const DrawPoolType type)
pool->m_framebuffer->disableBlend();
} else if (type == DrawPoolType::FOREGROUND) {
pool->setFPS(FPS10);
} else if (type == DrawPoolType::LIGHT) {
pool->m_alwaysGroupDrawings = true;
pool->m_framebuffer->setCompositionMode(CompositionMode::LIGHT);
}
} else {
pool->m_alwaysGroupDrawings = true; // CREATURE_INFORMATION & TEXT
Expand Down

0 comments on commit 4de4689

Please sign in to comment.