You Are Here:

Community: Developer Discussion Boards

#1 Old using drawPixels & getPixels And Heap issues - 2004-01-01, 14:26

Join Date: Mar 2003
Posts: 12
yuvalgeva
Offline
Registered User
hi,
I'm a game developer and i face with some image drawing and heap limitation issues: specially on series 40

now i have a character which has 6 sprites (each for a different action - stand, run, hit_up...) . in the constructor i'm loading all the 6 sprites into bytes array, and in runtime i create the relevant Image object and paint the relevant frame using clipping.

I want to try using nokia native methods and to avoid the creating of an Image object each time of changing action (we notice a memory leak in 7650 with the Image objects).
my problem is that i want to keep all the sprite short array (using getPixels) in the heap so the drawing will be smooth, but i don't have enough memory. i also tries to put all the sprites images into 1 image and by that to reduce the jar file (i'm fighting every Byte...), but unfortunately i can't create the Image and get the pixels from it without crashing the heap.

any suggestion or tips ???

cheers,
Yuval
Reply With Quote

#2 Old 2004-01-02, 09:10

Join Date: Mar 2003
Posts: 49
Location: United Kingdom
mrmop
Offline
24/7
I have been told that creating and then disposing of objects on Nokia phones is a bad idea as there is no garbage compactor, which causes memory to become highly fragmented. You may be better of creating the Image object once in the constructor and then re-using it.
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: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d134434X 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