Skip to content
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

Merged
merged 6 commits into from Apr 19, 2021

Conversation

caryliu1999
Copy link
Contributor

@caryliu1999 caryliu1999 commented Apr 15, 2021

}

BufferAllocator::~BufferAllocator() {
for (auto buffer : _buffers) {
buffer.second->decRef();
}
_buffers.clear();
BufferAllocator::_pools.erase(_type);
_caches.clear();
Copy link
Contributor

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.

Copy link
Contributor Author

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
@minggo minggo merged commit 3834eca into cocos:v3.1 Apr 19, 2021
@caryliu1999 caryliu1999 deleted the v3.1-fix-deferred-performance branch June 22, 2021 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants