Revert "[core] Use release() instead of get()/reset() in Raster"

No one owned the data after release(), so this wasn't being free'd.
reset() does that, thus this patch causes a huge memory leak.
This commit is contained in:
Bruno de Oliveira Abinader
2016-06-07 16:12:53 +03:00
parent 269124ec26
commit 680fcd09b1

View File

@@ -59,6 +59,7 @@ void Raster::upload(gl::ObjectStore& store) {
#endif
MBGL_CHECK_ERROR(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE));
MBGL_CHECK_ERROR(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE));
MBGL_CHECK_ERROR(glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, img.data.release()));
MBGL_CHECK_ERROR(glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, img.data.get()));
img.data.reset();
}
}