R.Z.
2005-09-20 09:38:15 UTC
i was wondering whether it pays off in term of memory use to store many
empty deques, or is it better to only store deques with size > 0. and does
the size of an empty deque depends on the size of the type of its members
even if the deque is empty?
i've also read that the sizeof operator cannot be used with arrays that
allocate memory dynamically (and there is some dynamic memory allocation
inside of a deque class, isn't it?) so i figured it wouldn't give me correct
size of my deque.
best regards
Remi
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
empty deques, or is it better to only store deques with size > 0. and does
the size of an empty deque depends on the size of the type of its members
even if the deque is empty?
i've also read that the sizeof operator cannot be used with arrays that
allocate memory dynamically (and there is some dynamic memory allocation
inside of a deque class, isn't it?) so i figured it wouldn't give me correct
size of my deque.
best regards
Remi
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]