quote:
Original post by AndyLquote:
Original post by Ruudje
when using an array you always have to use []
Hmmmm... My compiler must realise how cool I am and fix it for me, then.quote:
but could we plz go back to my problem now?![]()
Is it possible that some other part of your program holds a pointer to the data structure that''s being deleted and then reallocated?
For instance if you had a "renderer" object with a pointer to some vertexes, it would crash during the next frame.
(About your object parser, you''re intentionaly throwing away the first token, right? And the LAST token on each line is .ID?)
Two other ideas occured to me that are probably not important at all unless you''re multi-threading, but I thought they were worth mentioning.
1) How would your program react if your renderer were called in the middle of this load operation?
2) strtok(...) isn''t thread-safe.
(P.S. Don''t forget to glDeleteLists.)
-Andy
Well, it does, but any object deleted is re-allocated a few lines later...