This is an offensive line:
Texture *texture = new Texture (...);
I get from bad_alloc here:
void *__CRTDECL operator new(size_t size) _THROW1(_STD bad_alloc) { // try to allocate size bytes void *p; while ((p = malloc(size)) == 0) if (_callnewh(size) == 0) { // report no memory static const std::bad_alloc nomem; _RAISE(nomem); } return (p); }
size ~ 28 bytes
and so far the program has put maybe 2 MB in a heap on a 32-bit system (new reboot), and before that, only about twenty things are allocated on the heap, so I donβt know that it is not a heap.
I'm so confused ...
source share