[gdal-dev] Fwd: How to reuse memory pointer of GDAL Memory driver

Mateusz Loskot mateusz at loskot.net
Mon Jun 6 02:05:09 PDT 2016


On 6 June 2016 at 10:57, Pol Monsó Purtí <lluna.nova at gmail.com> wrote:
> On Mon, Jun 6, 2016 at 10:51 AM, Mateusz Loskot <mateusz at loskot.net> wrote:
>>
>> On 6 June 2016 at 10:45, Pol Monsó Purtí <lluna.nova at gmail.com> wrote:
>> >
>> > In my case I have a std::vector<GByte*> of the 3 bands,  where the
>> > GByte* are
>> > allocated in the heap with new GByte[width*height].
>> > I guess that won't work
>> > because the three bands have to be one single memory chunk, am I right?
>>
>> vector allocates is single continuous block of memory.
>> ...or I don't understand the problem.
>
>
> The std::vector has 3 GByte* elements.

My apologies for sloppy reading, I missed the '*' and read as vector<GByte>

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net


More information about the gdal-dev mailing list