Saving/loading supah-fast

Started by
14 comments, last by pollier 22 years, 2 months ago
in a case like that... it''s likly best to whack a function inside of MyObject that creates a buffer for you.. but this can get mighty complex, and you need to be careful with memory allocation if you do..

the best thing is to save each myObject in it''s own file. assuming there arn''t 10,000 of em...
Advertisement
on second thought... it''d would likly be a lot better to actually re-think how you are managing your data in such a case.
I suppose...

I could make a big array containing all of the data for every object and then set pointers to different indexes in the array for every object?
"No break 'till you die!" - Mr. Foster, my English teacher
don''t use pointers, use index''s... these can be saved with much greater ease.. and you can use unsigned shorts, which save 2 bytes.

you should NEVER save a memory pointer to a file. as it will NEVER be the same the next time you run the app. (unless some crazy miricle occurs)
Whoops, thats what I meant . Okay, I''ll have to write some more classes now . Thanks!
"No break 'till you die!" - Mr. Foster, my English teacher
sure thing

This topic is closed to new replies.

Advertisement