View Single Post
Old 16th December 2016, 14:21   #23  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
Code:
	rgblab = new long[16777216];
	labrgb = new long[16777216];
and no delete[] for both arrays, basic memory leak..
use smart pointers if you want some kind of automatic GC for C++ like in Java or C#

and both arrays do not feature a runtime determined length, simply make them static if worrying about blowing the stack up
Code:
	static int32_t rgblab[16777216];
	static int32_t labrgb[16777216];
feisty2 is offline   Reply With Quote