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

Use freeArray in HashMap destructor #893

Merged
merged 1 commit into from Nov 18, 2014

Conversation

Projects
None yet
3 participants
@etcimon
Contributor

etcimon commented Nov 2, 2014

This ensures destructors are called on the elements in the hash map. I'm not sure if this fixes anything but it seemed like it could have caused issues eventually.

Use freeArray in HashMap destructor
This ensures destructors are called on the elements in the hash map. I'm not sure if this fixes anything but it seemed like it could have caused issues eventually.
@mihails-strasuns

This comment has been minimized.

Show comment
Hide comment
@mihails-strasuns

mihails-strasuns Nov 2, 2014

Contributor

regression unittest please

Contributor

mihails-strasuns commented Nov 2, 2014

regression unittest please

@etcimon

This comment has been minimized.

Show comment
Hide comment
@etcimon

etcimon Nov 2, 2014

Contributor

There was no issue, it seems like the proper thing to do though..

Contributor

etcimon commented Nov 2, 2014

There was no issue, it seems like the proper thing to do though..

@mihails-strasuns

This comment has been minimized.

Show comment
Hide comment
@mihails-strasuns

mihails-strasuns Nov 2, 2014

Contributor

As I understand you expect that old code didn't call array element destructors (and indeed it seems so from the code alone). Common practice for doing such changes is adding unittest that would fail before the change and starts passing with it (one that verifies that destructors get called in this case).

Contributor

mihails-strasuns commented Nov 2, 2014

As I understand you expect that old code didn't call array element destructors (and indeed it seems so from the code alone). Common practice for doing such changes is adding unittest that would fail before the change and starts passing with it (one that verifies that destructors get called in this case).

@etcimon

This comment has been minimized.

Show comment
Hide comment
@etcimon

etcimon Nov 2, 2014

Contributor

The array Is created with allocArray and destroyed with freeArray elsewhere in the code. Its at least a consistency issue

Contributor

etcimon commented Nov 2, 2014

The array Is created with allocArray and destroyed with freeArray elsewhere in the code. Its at least a consistency issue

s-ludwig added a commit that referenced this pull request Nov 18, 2014

Merge pull request #893 from etcimon/patch-1
Use freeArray in HashMap destructor

@s-ludwig s-ludwig merged commit 0593f39 into vibe-d:master Nov 18, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment