You Are Here:

Community: Developer Discussion Boards

#1 Old Memory issue in 7210,3300 - 2003-10-07, 21:32

Join Date: Aug 2003
Posts: 20
albertjohn
Offline
Registered User
as i am designing Action Game i want to create around 10 images concurrently to make my game look reality but as loading some 7 images theres an error unable to excute application

is this thing only comes in emulator or even it will come in real phones?

how come to solve the problem?

can we flush out classes or images explicitly(forcing Garbage collector)?

please help me in this regard..

Thanks in advance
Bye
John
Reply With Quote

#2 Old 2003-10-07, 23:27

Join Date: Jun 2003
Posts: 4,325
Location: Cheshire, UK
grahamhughes's Avatar
grahamhughes
Offline
Forum Nokia Champion
If you run out of memory on the 7210 emulator, then chances are you'll run out of memory on the real phone.

You cannot discard classes, but you can discard unwanted image objects, by setting a variable that refers to the object to null.
Code:
// load image here
Image img = Image.createImage ("/MyPicture.png");

// ...then use it...

// discard it here
img = null;
Images can take a lot of memory... roughly two bytes per pixel.

If areas of your images can be painted (say, with rectanges of solid colour), then use fillRect() to paint those areas, and cut out only the bits of the images that you can't paint with graphic functions.

Graham.
Reply With Quote

#3 Old 2003-10-08, 13:16

Join Date: Mar 2003
Posts: 382
jalev's Avatar
jalev
Offline
Forum Nokia Expert
Hello

Please check from 7210 SDK settings how much your application is taking memory and remember that
RunTimeHeap is only 200 kb.
Reply With Quote

#4 Old Thank you will there be any speed diff... - 2003-10-08, 22:34

Join Date: Aug 2003
Posts: 20
albertjohn
Offline
Registered User
Thanks to Mr.Graham loading whenever the image is needed and unloading it.

i am not using this idea when the image is frquently needed !

...but will there will be any difference in speed of execution in emulator and in real phone by using this technique?

Yes KVM heap size is 200kin 7210 -can we increase the size as that of series-60 emulator

also is there any series-60 emulators(Nokia 3650) for testing the game?


bye
Albert C John
Last edited by albertjohn : 2003-10-08 at 22:39.
Reply With Quote

#5 Old 2003-10-08, 23:34

Join Date: Jun 2003
Posts: 4,325
Location: Cheshire, UK
grahamhughes's Avatar
grahamhughes
Offline
Forum Nokia Champion
Yes, loading the image will take processor time, so performance will suffer unless you can find natural pauses in the application when you can load images without it causing a problem.

The alternative might be to need less memory (by making your application smaller!).

You can change the size of the heap in the 7210 emulator with the -heapsize option... see the 7210 SDK documentation. But you can't change the size in the real phone, so if your application only works on a Series 40 with 250k of heap, it doesn't work on real Series 40 phones!

I don't use Series 60 emulators, so I don't know... take a look in the main forum, I think there is a Series 60 SDK or some such.

Graham.
Reply With Quote

#6 Old Thanks - 2003-10-09, 16:04

Join Date: Aug 2003
Posts: 20
albertjohn
Offline
Registered User
Once again thanks for replying me
ok i will find the solution for series 60 emulators
bye for now
Regds
Albert C john
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d18645X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ