HeapAlloc bombing
-
I have a weird one, here. I have a class that uses a linked list of pointers to another class (ie. a mbr var that has a pointer to the next object). In my processing, I loop to create the necessary instances of the "outside" class. As part of the constructor of that object, the linked list is built by calling new inside of a loop. The first "outside" object is created flawlessly. When the second "outside" object is created, while the first mbr of the linked list is being created, HeapAlloc bombs out. Does anyone have any clues on what this could be? I tried wrapping the "obj = new objclass" in a try/catch(...), but nothing is caught. I'm at my wit's end on this one.
-
I have a weird one, here. I have a class that uses a linked list of pointers to another class (ie. a mbr var that has a pointer to the next object). In my processing, I loop to create the necessary instances of the "outside" class. As part of the constructor of that object, the linked list is built by calling new inside of a loop. The first "outside" object is created flawlessly. When the second "outside" object is created, while the first mbr of the linked list is being created, HeapAlloc bombs out. Does anyone have any clues on what this could be? I tried wrapping the "obj = new objclass" in a try/catch(...), but nothing is caught. I'm at my wit's end on this one.
Recursive memory alloc, perhaps? A
TRACE()
statement in a constructor or two might identify this if it's the problem. /ravi My new year's resolution: 2048 x 1536 Home | Articles | Freeware | Music ravib@ravib.com -
I have a weird one, here. I have a class that uses a linked list of pointers to another class (ie. a mbr var that has a pointer to the next object). In my processing, I loop to create the necessary instances of the "outside" class. As part of the constructor of that object, the linked list is built by calling new inside of a loop. The first "outside" object is created flawlessly. When the second "outside" object is created, while the first mbr of the linked list is being created, HeapAlloc bombs out. Does anyone have any clues on what this could be? I tried wrapping the "obj = new objclass" in a try/catch(...), but nothing is caught. I'm at my wit's end on this one.
It took me going home last night and clearing my head. When I came in today, I started walking through all the memory allocation in that process. I found a copy/paste error that was corrupting the heap.