QT QML: memory does not decrease when item is destroyed [closed] - android

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I have dynamically created a qml page.
I used a JS file to create it.
Then I have tried to destroy the created object.
But I have observed that the amount of memory always increases instead of decreasing after the destroy call.

First of all, Qt doesn't guarantee that Item will be removed instantly. You should expect real deletion later.
How did you observe it? Did you look at virtual memory or physical memory? Do you understand this? And can you provide example?

Related

App is Lagging/Hanging. Why? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I made a simple profile in my android app and after uploading image to firebase storage my app is lagging in speed, the image uploaded is in KBs size and in my profile I am using a Navigation Drawer whose sliding animation is also hanging. I am unable to figure out whats going wrong.
Maybe your are using the Main thread for doing all the job. This is one reason for UI thread to hang(i.e) the app didn't hang but it waits for the main UI thread to complete its work.
Generally, the app hangs for this reason. As suggested by Commonsware track methods. Also, try using background threads instead of main thread.

app corrupts when onTouch is triggered while changing activity [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I made a little game touch the screen to move up, release to go down. However, the player can die by colliding with the screen bounds. On collision, a new activity starts. 'Unfortunately the app has stopped' appears when I keep pressing after the collision. Using onTouchEvent.
What can I do?
I am using Eclipse, and appreciate every answer
Take a look at the code that you execute in response to the onTouch event. Can it execute if the Activity is being destroyed or has already been destroyed , e.g. are you using a background thread or an AsyncTask? You need to respect the Activity lifecycle, otherwise you may be attempting to access an Activity that is no longer in an active state.

setImageResource and memory leak [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
In my Activity, I use imageView.setImageResource(R.drawable.image_name); about 8 times for different views.
I kept opening and closing the activity repeatedly and I notice the app is getting laggy. I am wondering if this is related to memory leak? Is it because of that piece of code?
You should recycle() all your bitmaps when done using them. If you want to destroy them when activity is finish()ed, you can override onDestroy to destroy all bitmaps

App Introduction to user on first installation [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I wonder how google does it?? When you first power your device on, A introduction to apps and features will be shown in green color when user touches it the element will disappear ! I tried searching google but i don't get exact idea of what that layout / element was? Please regret me if this was a duplicate question.
this is definitely what you are looking for
Holo-themed transparent demo overlays
Are you just trying to do something on the first launch and then never again? Or are you looking for that look and feel? If so, it's probably just images and such layed out. If you want to test the first launch, there's a few ways to do it. One of the easiest is to create an empty file in the shared preferences in your onCreate() method, then check to see if it is there. If it's not there, you do your on first launch action and then create the file afterwards.
Check this out: Determine if android app is the first time used

Android battery consuption [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
3rd party is running battery test on my android app.
They say that "Exceeds idle mode current when there is no services running with no data connectivity" for the test
test : Idle screen power after quiting the application
Current consumed (mA) :108.93
Battery Life time (hrs) : 11.11
Can anyone help me what I am doing wrong?
I was doing lot of database inserts into sqlite. But it was one time thing at the time of first run.

Categories

Resources