[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-dev] Re: Not enough storage was allocated to hold the appended da
[Gnash-dev] Re: Not enough storage was allocated to hold the appended data!
Tue, 18 Nov 2008 14:21:32 -0700
Thunderbird 22.214.171.124 (X11/20080723)
> I've naively fixed the previous problem by avoiding the
> stack allocation of Elemtn.
> Now, next problem is amf::Buffer throwing this exception:
> Not enough storage was allocated to hold the appended data!
That's no a problem, that's what it's supposed to do. :-)
>>From the code I understand amf::Buffer::append does NOT
> do reallocation. Is caller responsible for reallocations
> then ? Which Buffer method should caller use to reallocate ?
Buffer::resize() of course, which does the additional step of copying
the data to the newly resized buffer. Yes, buffers are ::init()'d to a
size, and only ::resize() does any more memory allocations. This is on
- rob -