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

Reduce capacity of polygon_{;45_;90_}set with shrink_to_fit functionality #25

Open
sbigalke opened this issue Nov 19, 2018 · 0 comments

Comments

@sbigalke
Copy link

First, I'd like to thank you for providing such an awesome library.

But I think the method shrink_to_fit() is missing in order to reduce the capacity of any set.

In your documentation, it is mentioned under the clear() command that one should

Use shrink to fit idiom and assign default constructed polygon set to deallocate.

but there is no way of getting the vector to "shrink_to_fit()" because the value() function is declared as const.
So basically, one has no option to deallocate the memory of a huge polygon_set .

An easy fix would be to add a method as follows:

void shrink_to_fit(){
    data_.shrink_to_fit();
}
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

No branches or pull requests

1 participant