New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize the performance of the memory pool. #3414
Conversation
…erformance # Conflicts: # cocos/renderer/pipeline/InstancedBuffer.cpp
} | ||
|
||
BufferAllocator::~BufferAllocator() { | ||
for (auto buffer : _buffers) { | ||
buffer.second->decRef(); | ||
} | ||
_buffers.clear(); | ||
BufferAllocator::_pools.erase(_type); | ||
_caches.clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think _buffers.clear() and _caches.clear() is not needed in destructor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think _buffers.clear() and _caches.clear() is not needed in destructor.
Ok, I delete them.
…erformance # Conflicts: # cocos/renderer/pipeline/deferred/DeferredPipeline.cpp # cocos/renderer/pipeline/deferred/DeferredPipeline.h
https://github.com/cocos-creator/3d-tasks/issues/6760