You Are Here:

Community: Developer Discussion Boards

#1 Old Repaint cause Memory Leak on KVM - 2003-04-05, 22:21

Join Date: Mar 2003
Posts: 5
nciamsoft
Offline
Registered User
Hi everyone,

I try to develop a graphic application. After I load some PNG, I've got a memory leak everytime when I call repaint() method.

Any idea?

Thanks.
Reply With Quote

#2 Old 2003-04-07, 16:07

Join Date: Mar 2003
Posts: 23
bitsonic
Offline
Registered User
did you set those image objects that never used again to null?
Reply With Quote

#3 Old 2003-04-07, 19:09

Join Date: Mar 2003
Posts: 5
nciamsoft
Offline
Registered User
Yes, I did.

But the Memory Leak is only happen when I call the Repaint() function.

Any idea? Thanks.

Kit
Reply With Quote

#4 Old 2003-04-08, 16:20

Join Date: Mar 2003
Posts: 23
bitsonic
Offline
Registered User
I am not sure about your problem. But maybe you can try to use gc(). In my program, memory useage continue to increase. But after I use gc() a lot of memroy been released. Even I don't use gc() manually, system automatically call it when free memory used out. By the way, review your program to ensure that there is no any object that never used again but still in reference. Such objects isn't collected by gc and may cause memory leak.
Hope it helps.
Last edited by bitsonic : 2003-04-08 at 17:01.
Reply With Quote

#5 Old 2003-04-08, 17:08

Join Date: Mar 2003
Posts: 40
pvermeulen
Offline
Registered User
I encounter the same problem.
Even the Nokia Blockgame heap memory is growing in the emulator status all the time.
When it's full it seem to reset to zero and start all over again.

-Peter
Reply With Quote

#6 Old 2003-04-09, 00:02

Join Date: Mar 2003
Posts: 5
nciamsoft
Offline
Registered User
pvermeulen: Would it be the SDK bug??

bitsonic: I did your approach. It can resolve my problem but it that gc() should occur everytime when I call object = null???

Thanks,

Kit
Reply With Quote

#7 Old 2003-04-09, 00:53

Join Date: Mar 2003
Posts: 23
bitsonic
Offline
Registered User
Acutally, system may not immedially call gc() after you set objects to null. Unless you manually call gc(). To my knowledge, only when there is not enough memory would the system call gc() to collect those unused objects and to release memory. That is why someone saw memory usage increasing and then reduce suddenly.
Reply With Quote

#8 Old 2003-04-10, 02:36

Join Date: Mar 2003
Posts: 5
nciamsoft
Offline
Registered User
oic.
Reply With Quote

#9 Old 2003-04-10, 08:14

Join Date: Mar 2003
Posts: 40
pvermeulen
Offline
Registered User
I don't know if it's an SDK bug (3510i sdk) ?

I'm new to J2ME programming (I actually only started this week) ; but my game should be finished next week and not being able to check for memory leakes is quite annoying.

If anyone else that is using the 3510i sdk encounters the same problem please post here..

Thx,

-Peter
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