On Wed, Apr 24, 2013 at 10:44 PM, TONGARI
2013/4/25 Christian Henning
On Sun, Apr 14, 2013 at 7:15 PM, Christian Henning <
wrote:
Well, after a deeper look, some ctors need _align_in_bytes from
another
image... if you don't care an extra data member, it's still doable.
Or maybe I should cook me own :(
I have added a fix to reuse memory when an image is smaller than the
chhenning@gmail.com older one. Would you mind having a look and give me some feedback?
Unfortunately I think this is buggy for deallocate. Since _view's dimensions are changed after recreated, you can't get the original capacity from the changed dimensions.
Capacity must be kept to make deallocate right.
You are absolutely correct! But I think it's enough to keep the original dimensions so the deallocate( ... ) call in the destructors frees the correct amount of memory.
BTW, I've made my own image type which accepts align as a template param instead.
I could see this making sense. Is it just exchanging the member with an int template parameter? I'm a bit worries of breaking too much code when introducing into boost. What do you think?
Christian
Thanks
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost