![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programming Guru
![]() |
Clearing Python's Memory
I've checked the Pygame docs, haven't found anything. But once all the images and sounds are loaded with Pygame, and after I'm done using them, how can I clear them from Python's memory?
Do I just kill the variable by going x = None ? Or will that not clear the loaded image or sound from Python's memory? |
|
|
|
|
|
#2 |
|
Programming Guru
![]() |
Look up garbage collection? thats the handle for cleaning up objkects in other languages, maybe pygame has the same thing....
Sorry cant help you more then that.
__________________
"Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute. THAT'S relativity." - Albert Einstein |
|
|
|
|
|
#3 |
|
Professional Programmer
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4
![]() |
Should be taken care of by the garbage collector. You can free the memory and clear the name reference like so:
del varName Last edited by Cerulean; Aug 1st, 2005 at 1:20 PM. |
|
|
|
|
|
#4 |
|
Programming Guru
![]() |
Sweet. Thanks Cerulean as always. :p
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|