| Reply | « Previous Thread | Next Thread » |
|
After loading and using images, sometimes it will good (spare memory) to unload or close images. I only found the possibility to clear an image, but not more. Closing or deleting dont work
thank you for your tip |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
Have you tried something like this:
Code:
#Let's assume img is your image object del img #This deletes it |
|
I my god - so simple!? What a shame! Thank you...
(I've tried img.delete() ) |
|
Quote:
Code:
img = graphics.Image.open("E:\\Images\\myimage.jpg")
img2 = img # img and img2 reference the same image. There are no two Image() objects.
del img # The Image() object still stays, because img2 points to it.
del img2 # Now the memory of the Image() object may be reclaimed.
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Incorrect rgb values for jpg images on S40 3rd ed | bjudfar | Mobile Java Media (Graphics & Sounds) | 8 | 2007-05-29 17:34 |
| How to use code to get images from webCam??? | DancingWave | Browsing and Mark-ups | 0 | 2006-04-10 10:06 |
| How can I unload the images I finish using them during run time in mobiles? | bb_sathya | Mobile Java General | 23 | 2005-12-13 10:07 |
| Help with creating Images..Pls | rj_cybersilver | Mobile Java Media (Graphics & Sounds) | 0 | 2005-03-02 02:58 |
| Problem with PNG Images | cyphre666 | Mobile Java Media (Graphics & Sounds) | 4 | 2003-12-12 19:20 |