objects, crashes, and negative memory oh my [message #51663] |
Thu, 30 November 2006 14:38 |
Pete Warner
Messages: 14 Registered: July 2006
|
Junior Member |
|
|
Hopefully one day I'll join the crowd of you helpful people who answer
questions instead of coming up with them, but that day is not today.
I've got an object that should hold and organize a large number of
arrays and pointers and arrays of pointers and then clean them up when
I'm done. I know I have enough memory for the data in question because
I can load it without using pointers. I want the objects and pointers
for flexibility and to make the overall program easier to work with.
The problem is that I'm crashing IDL. I create the object, and then
destroy it to check for leaks. Using help, /heap_variables I show 0
pointers and objects. Then if I create and destroy it again IDL locks
up or crashes to desktop with some memory errors. I figured there must
be crazy leaking going on but I can't find it.
1. Restart computer
2. Load IDL
3. Load project with objects
4. Compile project
5. IDL> print, memory(/l64, /current)
845185
6. IDL> test = obj_new('mtgv_lodat', 'model.txt',
'c:/rsi/projects/gicvu idl/system models/')
7. IDL> print, memory(/l64, /current)
412234
8. IDL> obj_destroy, test
9. IDL> print, memory(/l64, /current)
-1077816
If I repeat the process starting at 5 IDL blows up after a repetition
or two. If anyone has had this problem before and knows a solution I'd
be grateful. I couldn't find a solution searching the board, the IDL
help, or the ITTVIS IDL memory allocation FAQs.
On the other hand, if anyone wants to buy a program that uses negative
memory this is your lucky day.
|
|
|