Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Out of memory error when using ImageView to render PNGs

Out of memory error when using ImageView to render PNGs

All your problems with Audio, Video and Images.

Out of memory error when using ImageView to render PNGs

Postby underminedsk » Wed Mar 10, 2010 4:28 pm

Hey everyone,

I am getting a sporadic out of memory error when I render a PNG to the screen using ImageView. What is frustrating is that it doesn't happen every time...just most of the time.

Here is my code for my imageview class; it's very simple:
[syntax="java"]
package com.ui;

import com.code.R;
import com.code.R.drawable;

import android.content.Context;
import android.graphics.Canvas;
import android.widget.ImageView;

public class Corners extends ImageView {

public Corners(Context ctx) {
super(ctx);
setCornersGreen();
setInvisible();
}

protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
invalidate();
}

public void setVisible() {
setAlpha(200);
}

public void setInvisible() {
setAlpha(60);
}

public void setCornersRed() {
setImageResource(R.drawable.corners_red);
}

public void setCornersGreen() {
setImageResource(R.drawable.corners_green);
}

}
[/java]

Obviously there is a memory leak somewhere...am I not doing something with garbage collection that I should be? I would think there would be an easy fix to this...

Zach
underminedsk
Developer
Developer
 
Posts: 26
Joined: Tue Mar 02, 2010 3:36 am

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 6 guests