Questions tagged [recycle]
338 questions
2
votes
1 answer
Bitmap Recycle Error
I have a high resolution image in my application. I am scaling and setting it to background of a fragment in onResume() and recycling it onPause().
@Override
public void onResume() {
if(obj_bitmap == null)
{
obj_bitmap =…

Pritam Kadam
- 3,203
- 4
- 19
- 41
2
votes
1 answer
WPF item container recycling
I want to implement a custom Canvas that recycles containers when used as an ItemsPanel. So I derived from VirtualizingPanel and override the ArrangeOverride and MeasureOverride. I am doing the generation in MeasureOverride like this:
var children =…

John Quest
- 85
- 1
- 7
2
votes
0 answers
Need better option when trying to restore from the recycle bin
This is the code I have now. This goes through the explorer. But I need a better option.
o = win32com.client.Dispatch("WScript.Shell")
#o.SendKeys("#m")
#time.sleep(5)
import subprocess as sp
p =…

user3597409
- 39
- 1
- 1
- 7
2
votes
3 answers
ByteBuffer recycling class
I'm wondering how I'd code up a ByteBuffer recycling class that can get me a ByteBuffer which is at least as big as the specified length, and which can lock up ByteBuffer objects in use to prevent their use while they are being used by my code. This…

Chris Dennett
- 22,412
- 8
- 58
- 84
2
votes
2 answers
ListView inflating issue
I'm building an sms app, and need to show the view according to Incoming/Outgoing sms.
I'm facing the following issue, in my getView(..) I need to know if it's Incoming/Outgoing and then to show the following:
Incoming VIEW
Outgoing VIEW
But i…

Udi Oshi
- 6,787
- 7
- 47
- 65
2
votes
1 answer
How to recycle unreachable objects for future using in Common Lisp?
I'm using gsll with antik to do some scientific calculations, and I found that antik does not reuse unreachable objects and always allocates new ones, which makes my program slow.
For example, there's a function called lu-invert in gsll, which…

SaltyEgg
- 1,498
- 1
- 15
- 26
2
votes
0 answers
WPF - Container recycling for Canvas
I have an itemscontrol whose itemspanel is set to use a canvas. The itemtemplate Im using happens to be quite expensive to create, and the itemssource collection bound changes frequently, and so I'd like to use some kind of container recycling.
How…

pastillman
- 1,104
- 2
- 16
- 27
2
votes
1 answer
Bitmap.recycle() - "IllegalArgumentException: Cannot draw recycled bitmaps"
In the documentation, titled "Managing Bitmap Memory" you can find the following statement:
Caution: You should use recycle() only when you are sure that the bitmap is no longer being used. If you call recycle() and later attempt to draw the…

Sebastian Engel
- 3,500
- 32
- 30
2
votes
2 answers
How to Go to main Activity
I have wrote a code for a button to let me move from an activity in my application to my main activity. But an error occurred during run :
07-21 09:28:13.864: E/dalvikvm-heap(371): 25165824-byte external allocation too large for this…

Tolen
- 111
- 9
2
votes
2 answers
Android and image recycling
How exactly does image recycling work in Android?
Allow me to elaborate:
If I have the following:
myBitmap = BitmapFactory.decodeResource(curView.getResources(), R.drawable.mypic);
And log the following
Log.v("ImageStuff","Image is: "+myBitmap);
I…

Zippy
- 3,826
- 5
- 43
- 96
2
votes
2 answers
Android Listview : Button to hide a control in the row
I have a problem with a listview and ArrayAdapter.
My aim is to have a button on each row which allows the user to hide (or show) the TextView contained on this row.
But when I test my code, if I click the first row's button, it hides the first…

Batrarri
- 23
- 3
2
votes
3 answers
Linux script cp changing file name
I'm trying to make a sort of recycling bin. I have a delete function which sends the selected file to the recycling bin and adds the location of the directory it was stored in to the file. The problem is when I obtain the location from the script…

user1855080
- 21
- 1
2
votes
1 answer
Calling Bitmap#recycle() from a finalizer causes Android app to terminate silently
The Bitmap memory problem in Android has led me to implement a custom loader and downloader class that will download an image from the web, store a local copy, and create a Bitmap if requested to do so from the local copy. I'm keeping these in a…

Andrew Wyld
- 7,133
- 7
- 54
- 96
2
votes
1 answer
Do we have to explicitly recycle the bitmap if we don't need it?
Bitmap has a recycle method, but do we have to invoke it explicitly if we don't need it any more?
For example, an ImageView has a bitmap now. When user click a button, it will set a new bitmap to the ImageView.
Do we have to recycle the original…

Freewind
- 193,756
- 157
- 432
- 708
2
votes
2 answers
listview recycling strange empty space
I have a similar problem to the one in this question: ListView and rows recycling problem
Above is solved. but same solution does not work for me.
I have a listview consisting of textviews. Each textview can contain variable number of images. I am…

Timuçin
- 4,653
- 3
- 25
- 34