Crystal Space
Welcome, Guest. Please login or register.
July 31, 2014, 12:37:32 pm

Login with username, password and session length
Search:     Advanced search
9005 Posts in 2043 Topics by 8263 Members
Latest Member: Shiecuanco
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Projects
| |-+  Project Discussion
| | |-+  Reloading maps
« previous next »
Pages: [1] Print
Author Topic: Reloading maps  (Read 4195 times)
mik
Newbie
*
Posts: 36


View Profile Email
« on: March 26, 2009, 04:33:51 pm »

Hi all,

i have a doubt about how to load a map when i have already one loaded. I want to delete the first one (I don't need it anymore) and use the second one freeing the memory used by the old map. What is the best way to obtain this?
Logged
Vincent
Full Member
***
Posts: 191


View Profile WWW
« Reply #1 on: May 18, 2009, 07:01:53 pm »

Hello !

  one way would be to load stuff you want to unload later in a distinct region (with 1.2.1/1.4)
or collection (with 1.4+) depending on the CS version you use, and call eg.
iRegion::DeleteAll() or iCollection::ReleaseAllObjects().
Another option would be to just use iEngine::DeleteAll(), but then you might
have to re-load stuff you already loaded earlier.
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 4.208 seconds with 15 queries.