#1327 BlockVector should not initialize memory during reserve but in resize
Metadata
Property | Value |
---|---|
Reported by | Markus Blatt (markus@dr-blatt.de) |
Reported at | Aug 13, 2013 10:47 |
Type | Bug Report |
Version | Git (pre2.4) [autotools] |
Operating System | Unspecified / All |
Last edited by | Markus Blatt (markus@dr-blatt.de) |
Last edited at | Aug 13, 2013 10:53 |
Description
Currently during reserve the array constructor of the blocktype is called to initialize the newly allocated memory. This seems like the wrong place to do this and surprising behaviour.
I propose to remove this initialization and add it to the resize method. The resize method should probably also get another parameter to specify a default value for the initialization.