-
Notifications
You must be signed in to change notification settings - Fork 213
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
PoolBuffers::endBuffer Strategy issue #21
Comments
"return" on line 4 . |
line 2: the capacity maybe not the real capacity,it can have been changed by clip()? |
Hi, I had a algo redesign for PoolBuffers/PoolBuffer that I share now by this last commit => |
Hi, 1、 2、 3、 4、 |
Yes you are right, on my next commit I will solve it by the following fix: void PoolBuffers::endBuffer(Buffer* pBuffer) const { Thanks |
Thanks! I think it will work better now! |
1、void PoolBuffers::endBuffer(Buffer* pBuffer) const {
2、 if (pBuffer->capacity() > _maximumCapacity) {
3、 delete pBuffer;
4、 return;
5、 }
6、 pBuffer->clear(); //to fix clip, and resize to 0
......
}
should we take line 6 before line 2?
The text was updated successfully, but these errors were encountered: