[Gambas-devel] SVN, Image / memory fixes ...
Benoit Minisini
gambas at ...1...
Sun Jan 25 14:16:37 CET 2009
On vendredi 23 janvier 2009, Gareth Bult wrote:
> Ok,
>
> I've committed two fixes .. so SVN now compiles, and my camera demo now
> runs without crashing OR leaking memory .. :)
>
> You may want to restore your format calculation in IMAGE_size if you fix
> all other instances where you calculate the size of the image, however for
> now a small memory inefficiency gets around the problem. However, if you
> rely on the image format flag to calculate the prospective memory
> requirement then there's always a chance the format code will get screwed
> which will crash an app .. might be safer just to allocate the max memory
> required, given the hit is just 25% additional storage on images ... ?
>
> Incidentally, running 2 cameras for 10 mins and and it's not leaked a byte
> ... :)
>
> Gareth.
The bug was that the data allocated for the conversion used the old format,
not the new one, so the allocation was too small. I fixed that in revision
#1814.
Regards,
--
Benoit Minisini
More information about the Devel
mailing list