Crash of garbage collection problem!
Hello everyone.
I am doing multithreaded in my application. In my new thread, I use two signals and two locations.
Task of 1 signal & slot-
Given a parameter object in the signal I invoke a member function of that class in the slot.
Task of 2nd signal & slot-
Given the same parameter of the object to delete this object.
You may occur a quesiton why am I erasing memory in this way. In fact in my new thread using 1 signal & slot I want to download map mosaic of the server. But in the QT framework I couldn't download my new wire tile map. So, I use the MoveToThread() to move my new thread to the main thread object and let the main thread to do it for me. But now when I want to free my memory I can't delete my new thread because the main thread works with it. So I introduse signal 2nd slot mechanism to free my memory.
All the thing works well and good, except when I pan my card at all times & quickly he got crashed. Because my 1 signal & slot occupant already deleted object by 2nd signal slot.
I hope that I make you all understand the situation, if you need more information please let me know. This is a very critical issue for me. Hopyfully you guys can help me.
Hi sreejond,
I have a similar scenario in my application, in which case I use another thread to load the data of my main thread to use. It's the approach that I took:
Main thread invokes, charger wire;
Charger wire creates data objects and load the data in passes them to the main thread via a signal. (don't forget to use the MoveToThread() before issuing the sound signal).
Main thread receives the objects through a slot and then stores and uses the data objects.
Main thread deletes the data timely objects.
I think that if you simplify what you're trying to do, you will get a better result. I guess your main thread knows when it's time to remove the objects, so it can manage (delete) the himself.
Tags: BlackBerry Developers
Similar Questions
-
Interpolation and Garbage Collection problem
No matter what I I can not solve a problem with AS3 Garbage Collection of tween I'll have it is havoc on my tween instances works correctly/consistently. Some Sprites never tween at all, some do it but only part way. And it different effects almost every time.
I recently read about AS3 Garbage Collection and badly referenced interpolations and other asynchronous forums is picked up in the Middle process fairly. I feel the inconsistent behavior of signature that the I have read.
I tried to use the static properties level and not static class to store the references to my Tween instances so that they will not be shown for the GC. No luck. I placed references to these in the class-level tables, I also used static to() TweenMax method, which ensures that there will be the shield of GC and its static constructor instantiation not alt., with persistence: true. I have also set up another package custom; GCSafeTween(), others says it's as it should be, but it does not work in my case.
To test the GC problem, I edited the two eventListerners() in the Adobes fl.transitions.Tween so that their default weakReference property was false. This is properly the work of Tween. But this is a terrible solution.
Here is my code. Its a bit stripped down just to show the configuration.
Thank you for helping me solve this one!
The problem is finally solved.
I had another Alpha tween StackDisplay targeting a Sprite that is nested inside the main Sprites that I tried to tween Alpha. I noticed that if I planned other properties of the target Sprites they work always as interpolated. It was only the Alpha which would get stuck from time to time.JPSoul thanks for helping me to tackle the problem in a different way and get finally resolved.
FYI here is the line that caused the issue:
-
DataGrid Garbage Collection problem
Hello
I'm quite confused on the garbage of the DataGrid. I did a simple test code which adds a datagrid control to the display list. If I delete the component from its parent without clicking on any element, the element is collected correctly. However, if I click on an element, the datagrid control is removed is no longer. Otherwise, if I use the keyboard to navigate through the items, the component is removed.
The Profiler does not any reference to the data grid. So, what's the problem? Flex keeps all reference when I use the mouse?
Thanks in advance.After the test case.
-
UIComponentAccProps-Garbage Collection problem?
I can't understand why a custom component is not GC ' ed.
It has 5 lanes to the GC root:
> Skin > Group > UIComponentAccProps
> Parents > UIComponentAccProps
> UIComponentAccProps
> Skin > ProgrammaticToggleButton > ToggleButtonAccImpl
> Skin > children > UIComponentAccProps
The ProgrammaticToggleButton is extremely simple, so I don't think that this is the origin of the problem:
SerializableAttribute public class ProgrammaticToggleButton extends ToggleButton
{
public void ProgrammaticToggleButton()
{
super();
}
override protected function buttonReleased (): void
{
do nothing
}
}
Any ideas? It's driving me crazy.
See you soon
The Flex 4 Profiler gets too aggressive to slaughter "cycles." And, we have
Sin FP 10.1 that GC is not always complete. Thus, other
interaction and hammer the GC button could do something with 0 courses go
by far, but if it isn't then you must start looking for objects that have
references to the object such as its children or parents.
-
Turn on Weblogic Garbage Collection HP - UX Itanium
Hallo! I'm totally new to WebLogic. I was sent 11 Flexcube Universal Banking on Weblogic 10.3.2 accessing a server Oracle 11 GR 2 on HP - UX Itanium platform. Furthermore, I use Sun's JAVA virtual machine
However, the deployment of Flexcube is extremely slow, crashes and the server frequently managed overloads. I hope that by implementing the garbage collection, I can solve these problems.
Please provide me with the syntax to implement garbage collection operation in the architecture described above weblogic. All other boards of adjustment will be welcome. My setDomainEnv.sh script is as below
Thank you.
! / bin/sh
# CAUTION: This file is created by the Configuration Wizard.
# Any changes made to this script may be lost when adding extensions to this configuration.
#---Fonctions start-
BP = 100
SP = $BP
pushd()
{
If [-z "$1"]
then
return
FI
SP = 'expr $SP - 1'.
EVAL _stack$ SP = 'pwd '.
CD $1
return
}
popd()
{
If [$SP - eq $BP]
then
return
FI
EVAL cd \${_stack$SP}
SP = 'expr $SP + 1'.
return
}
#---Fonctions-
# *************************************************************************
# This script is used to set up the environment needed to be able to start Weblogic Server in this field.
#
# This script Initializes the following variables before calling commEnv to set the other variables:
#
# WL_HOME - the WebLogic of BEA installation directory.
# JAVA_VM - the Java VM you want to use. You can set this environment variable before calling
# This script from a Sun, or BEA, or everything just have the default set.
# JAVA_HOME - location of the version of Java used to start WebLogic
# Server. Depends directly on what JAVA_VM has the value default or the environment.
# USER_MEM_ARGS - the variable to override the standard memory arguments
# passed to java.
# PRODUCTION_MODE - the variable that determines if Weblogic Server is started in production mode.
# DOMAIN_PRODUCTION_MODE
# - The variable that determines if the workshop related settings such as the debugger,
# testconsole or iterativedev must be enabled. Can ONLY be set using the
command line parameter # named production
# NOTE: Specify the command line of production parameter will force
# the server starts in production mode.
#
# Other variables used in this text include:
# Servername - name of the weblogic server.
# JAVA_OPTIONS - Java command line options for the server. (These
# will be marked at the end of the JAVA_VM and
(# MEM_ARGS)
#
# For more information, see "Managing Server Startup and Shutdown for Oracle WebLogic Server"
# (http://download.oracle.com/docs/cd/E12839_01/web.1111/e13708/overview.htm).
# *************************************************************************
WL_HOME="/Oracle/middleware/wlserver_10.3".
export WL_HOME
BEA_JAVA_HOME =""
export BEA_JAVA_HOME
SUN_JAVA_HOME =""
export SUN_JAVA_HOME
If ["${JAVA_VENDOR}" = "Oracle"]; then
JAVA_HOME = "${BEA_JAVA_HOME}".
Export JAVA_HOME
on the other
If ["${JAVA_VENDOR}" = "Sun"]; then
JAVA_HOME = "${SUN_JAVA_HOME}".
Export JAVA_HOME
on the other
JAVA_VENDOR = "HP".
export JAVA_VENDOR
JAVA_HOME = "/ opt/java6.
Export JAVA_HOME
FI
FI
# It must reset the value of JAVA_HOME to get AND shortened
# We do not shorten above because immediate variable expansion will be erase
JAVA_HOME = "${JAVA_HOME}.
Export JAVA_HOME
SAMPLES_HOME = "${WL_HOME}" / samples ""
export SAMPLES_HOME
DOMAIN_HOME = ' / oracle/middleware/user_projects/domains/base_domain ".
export DOMAIN_HOME
LONG_DOMAIN_HOME = ' / oracle/middleware/user_projects/domains/base_domain ".
export LONG_DOMAIN_HOME
If ["${DEBUG_PORT}" = ""]; then
DEBUG_PORT = "8453.
export DEBUG_PORT
FI
If ["${server_name}" = ""]; then
Server_name = 'AdminServer.
Export SERVER_NAME
FI
POINTBASE_FLAG = "false".
export POINTBASE_FLAG
enableHotswapFlag =""
export enableHotswapFlag
PRODUCTION_MODE = 'true '.
export PRODUCTION_MODE
doExitFlag = "false".
export doExitFlag
verboseLoggingFlag = "false".
export verboseLoggingFlag
While [$#-gt 0]
do
case $1 in
/nodebug)
debugFlag = "false".
export debugFlag
;;
production)
DOMAIN_PRODUCTION_MODE = 'true '.
export DOMAIN_PRODUCTION_MODE
;;
notestconsole)
testConsoleFlag = "false".
export testConsoleFlag
;;
noiterativedev)
iterativeDevFlag = "false".
export iterativeDevFlag
;;
noLogErrorsToConsole)
logErrorsToConsoleFlag = "false".
export logErrorsToConsoleFlag
;;
nopointbase)
POINTBASE_FLAG = "false".
export POINTBASE_FLAG
;;
doExit)
doExitFlag = 'true '.
export doExitFlag
;;
noExit)
doExitFlag = "false".
export doExitFlag
;;
verbose)
verboseLoggingFlag = 'true '.
export verboseLoggingFlag
;;
enableHotswap)
enableHotswapFlag="-javaagent:${WL_HOME}/server/lib/diagnostics-agent.jar".
export enableHotswapFlag
;;
*)
PROXY_SETTINGS = "${PROXY_SETTINGS} $1.
export PROXY_SETTINGS
;;
ESAC
Maj
fact
MEM_DEV_ARGS =""
export MEM_DEV_ARGS
If ["${DOMAIN_PRODUCTION_MODE}" = "true"]; then
PRODUCTION_MODE = "${DOMAIN_PRODUCTION_MODE}".
export PRODUCTION_MODE
FI
If ["${PRODUCTION_MODE}" = "true"]; then
debugFlag = "false".
export debugFlag
testConsoleFlag = "false".
export testConsoleFlag
iterativeDevFlag = "false".
export iterativeDevFlag
logErrorsToConsoleFlag = "false".
export logErrorsToConsoleFlag
FI
# If you want to override the default Patch Classpath, the library path and the path for this area.
# Please uncomment the following lines and add a value valid for environment variables
# define PATCH_CLASSPATH = [myPatchClasspath] (windows)
# define PATCH_LIBPATH = [myPatchLibpath] (windows)
# define PATCH_PATH = [myPatchPath] (windows)
# PATCH_CLASSPATH = [myPatchClasspath] (unix)
# PATCH_LIBPATH = [myPatchLibpath] (unix)
# PATCH_PATH = [myPatchPath] (unix)
. ${WL_HOME}/common/bin/commEnv.sh
WLS_HOME = "${WL_HOME}" / Server ""
export WLS_HOME
If ["${JAVA_VENDOR}" = "Sun"]; then
WLS_MEM_ARGS_64BIT = "- Xms256m - Xmx512m".
export WLS_MEM_ARGS_64BIT
WLS_MEM_ARGS_32BIT = "- Xms256m - Xmx512m".
export WLS_MEM_ARGS_32BIT
on the other
WLS_MEM_ARGS_64BIT = "- Xms512m - Xmx512m".
export WLS_MEM_ARGS_64BIT
WLS_MEM_ARGS_32BIT = "- Xms512m - Xmx512m".
export WLS_MEM_ARGS_32BIT
FI
MEM_ARGS_64BIT = "${WLS_MEM_ARGS_64BIT}".
export MEM_ARGS_64BIT
MEM_ARGS_32BIT = "${WLS_MEM_ARGS_32BIT}".
export MEM_ARGS_32BIT
If ["${JAVA_USE_64BIT}" = "true"]; then
MEM_ARGS = "${MEM_ARGS_64BIT}".
export MEM_ARGS
on the other
MEM_ARGS = "${MEM_ARGS_32BIT}".
export MEM_ARGS
FI
MEM_PERM_SIZE_64BIT = ""-XX:PermSize = 128 m ""
export MEM_PERM_SIZE_64BIT
MEM_PERM_SIZE_32BIT = ""-XX:PermSize = 48 m ""
export MEM_PERM_SIZE_32BIT
If ["${JAVA_USE_64BIT}" = "true"]; then
MEM_PERM_SIZE = "${MEM_PERM_SIZE_64BIT}".
export MEM_PERM_SIZE
on the other
MEM_PERM_SIZE = "${MEM_PERM_SIZE_32BIT}".
export MEM_PERM_SIZE
FI
MEM_MAX_PERM_SIZE_64BIT = ""-XX:MaxPermSize = 256 m ""
export MEM_MAX_PERM_SIZE_64BIT
MEM_MAX_PERM_SIZE_32BIT = ""-XX:MaxPermSize = 128 m ""
export MEM_MAX_PERM_SIZE_32BIT
If ["${JAVA_USE_64BIT}" = "true"]; then
MEM_MAX_PERM_SIZE = "${MEM_MAX_PERM_SIZE_64BIT}".
export MEM_MAX_PERM_SIZE
on the other
MEM_MAX_PERM_SIZE = "${MEM_MAX_PERM_SIZE_32BIT}".
export MEM_MAX_PERM_SIZE
FI
If ["${JAVA_VENDOR}" = "Sun"]; then
If ["${PRODUCTION_MODE}" = ""]; then
MEM_DEV_ARGS = "-XX:CompileThreshold = $8000 {MEM_PERM_SIZE}"
export MEM_DEV_ARGS
FI
FI
# Must have a separate trial here because of the immediate expansion of the variables under windows
If ["${JAVA_VENDOR}" = "Sun"]; then
MEM_ARGS = "${MEM_ARGS} ${MEM_DEV_ARGS} ${MEM_MAX_PERM_SIZE}".
export MEM_ARGS
FI
If ["${JAVA_VENDOR}" = "HP"]; then
MEM_ARGS = "${MEM_ARGS} ${MEM_MAX_PERM_SIZE}".
export MEM_ARGS
FI
If ["${JAVA_VENDOR}" = "Apple"]; then
MEM_ARGS = "${MEM_ARGS} ${MEM_MAX_PERM_SIZE}".
export MEM_ARGS
FI
If ["${JAVA_VENDOR}" = "IBM"]; then
MEM_ARGS = "${MEM_ARGS} ${MEM_MAX_PERM_SIZE}".
export MEM_ARGS
FI
# If the environment variable USER_MEM_ARGS is set, use it to substitute the values of all THE MEM_ARGS
If ["${USER_MEM_ARGS}"! = ""]; then
MEM_ARGS = "${USER_MEM_ARGS}".
export MEM_ARGS
FI
JAVA_PROPERTIES = "-Dplatform.home =, ${WL_HOME} - Dwls.home = ${WLS_HOME} - Dweblogic.home = ${WLS_HOME}"
export JAVA_PROPERTIES
# To use Java authorization contract for containers (JACC) in this area,
# Uncomment the next section please. If there are several machines
# your domain name, make sure to change the setDomainEnv in the area associated with
# each machine.
#
# - Djava.security.manager
# - Djava.security.policy = weblogic.policy rental
# - Djavax.security.jacc.policy.provider = weblogic.security.jacc.simpleprovider.SimpleJACCPolicy
# - Djavax.security.jacc.PolicyConfigurationFactory.provider = weblogic.security.jacc.simpleprovider.PolicyConfigurationFactoryImpl
# - Dweblogic.security.jacc.RoleMapperFactory.provider = weblogic.security.jacc.simpleprovider.RoleMapperFactoryImpl
JAVA_PROPERTIES = "${JAVA_PROPERTIES} ${EXTRA_JAVA_PROPERTIES}".
export JAVA_PROPERTIES
ARDIR = "${WL_HOME} / server/lib '.
export ARDIR
pushd ${LONG_DOMAIN_HOME}
# Clustering support (edit for your cluster!)
If ["${ADMIN_URL}" = ""]; then
# The part then this block tells us we're starting either a server admin OR we are nonclustered
CLUSTER_PROPERTIES = ""-Dweblogic.management.discover = true ' "
export CLUSTER_PROPERTIES
on the other
CLUSTER_PROPERTIES = ' - Dweblogic.management.discover = false - Dweblogic.management.server = ${ADMIN_URL} ".
export CLUSTER_PROPERTIES
FI
If ["${LOG4J_CONFIG_FILE}"! = ""]; then
JAVA_PROPERTIES = "${JAVA_PROPERTIES} - Dlog4j.configuration = file: ${LOG4J_CONFIG_FILE}" "
export JAVA_PROPERTIES
FI
JAVA_PROPERTIES = "${JAVA_PROPERTIES} ${CLUSTER_PROPERTIES}".
export JAVA_PROPERTIES
JAVA_DEBUG =""
export JAVA_DEBUG
If ["${debugFlag}" = "true"]; then
JAVA_DEBUG = "-Xdebug - Xnoagent - Xrunjdwp: transport = dt_socket, address = ${DEBUG_PORT}", server = y, suspend = n - Djava.compiler = NONE ""
export JAVA_DEBUG
JAVA_OPTIONS = "${JAVA_OPTIONS} ${enableHotswapFlag} - ch - da: com.bea-da: Javelin--da: weblogic... -... ea:com.bea.wli - ea:com.bea.broker... - ea:com.bea.sbconsole..." »
Export JAVA_OPTIONS
on the other
JAVA_OPTIONS = "${JAVA_OPTIONS} {enableHotswapFlag} '-da '"
Export JAVA_OPTIONS
FI
If [! d ${JAVA_HOME} / lib]; then
ECHO "the JRE is not found in the directory ${JAVA_HOME}." (JAVA_HOME) »
ECHO "Please change your environment and set the JAVA_HOME.
echo "variable to point to the root directory of your Java installation.
popd
read _val
output
FI
If ["${POINTBASE_FLAG}" = "true"]; then
DATABASE_CLASSPATH = "${POINTBASE_CLASSPATH}".
export DATABASE_CLASSPATH
on the other
DATABASE_CLASSPATH = "${POINTBASE_CLIENT_CLASSPATH}".
export DATABASE_CLASSPATH
FI
If ["${DATABASE_CLASSPATH}"! = ""]; then
If ["${POST_CLASSPATH}"! = ""]; then
POST_CLASSPATH = "${POST_CLASSPATH} ${CLASSPATHSEP} ${DATABASE_CLASSPATH}".
export POST_CLASSPATH
on the other
POST_CLASSPATH = "${DATABASE_CLASSPATH}".
export POST_CLASSPATH
FI
FI
If ["${ARDIR}"! = ""]; then
If ["${POST_CLASSPATH}"! = ""]; then
POST_CLASSPATH = "${POST_CLASSPATH} ${CLASSPATHSEP} ${ARDIR}" / XQRL.jar ' "
export POST_CLASSPATH
on the other
POST_CLASSPATH = "${ARDIR}" / XQRL.jar ' "
export POST_CLASSPATH
FI
FI
# SUPPORT PROFILING
JAVA_PROFILE =""
export JAVA_PROFILE
SERVER_CLASS = "weblogic. Server '.
export SERVER_CLASS
JAVA_PROPERTIES = "${JAVA_PROPERTIES} ${WLP_JAVA_PROPERTIES}".
export JAVA_PROPERTIES
JAVA_OPTIONS = "${JAVA_OPTIONS} {JAVA_PROPERTIES} - Dwlw.iterativeDev = ${iterativeDevFlag} - Dwlw.testConsole = ${testConsoleFlag} - Dwlw.logErrorsToConsole = ${logErrorsToConsoleFlag}" "
Export JAVA_OPTIONS
If ["${DOMAIN_PRODUCTION_MODE}" = "true"]; then
"JAVA_OPTIONS =" - Dweblogic.ProductionModeEnabled = true, ${JAVA_OPTIONS} "
Export JAVA_OPTIONS
FI
#--Propriétés of configuration, so that we can save stdout and stderr to files
If ["${WLS_STDOUT_LOG}"! = ""]; then
echo "Logging WLS stdout to ${WLS_STDOUT_LOG}".
JAVA_OPTIONS = "${JAVA_OPTIONS} - Dweblogic.Stdout = ${WLS_STDOUT_LOG}" "
Export JAVA_OPTIONS
FI
If ["${WLS_STDERR_LOG}"! = ""]; then
echo "Logging WLS stderr to ${WLS_STDERR_LOG}".
JAVA_OPTIONS = "${JAVA_OPTIONS} - Dweblogic.Stderr = ${WLS_STDERR_LOG}" "
Export JAVA_OPTIONS
FI
# ADD EXTENSIONS TO CLASS PATHS
If ["${EXT_PRE_CLASSPATH}"! = ""]; then
If ["${PRE_CLASSPATH}"! = ""]; then
PRE_CLASSPATH = "${EXT_PRE_CLASSPATH} ${CLASSPATHSEP} ${PRE_CLASSPATH}".
export PRE_CLASSPATH
on the other
PRE_CLASSPATH = "${EXT_PRE_CLASSPATH}".
export PRE_CLASSPATH
FI
FI
If ["${EXT_POST_CLASSPATH}"! = ""]; then
If ["${POST_CLASSPATH}"! = ""]; then
POST_CLASSPATH = "${POST_CLASSPATH} ${CLASSPATHSEP} ${EXT_POST_CLASSPATH}".
export POST_CLASSPATH
on the other
POST_CLASSPATH = "${EXT_POST_CLASSPATH}".
export POST_CLASSPATH
FI
FI
If ["${WEBLOGIC_EXTENSION_DIRS}"! = ""]; then
JAVA_OPTIONS = "${JAVA_OPTIONS} - Dweblogic.ext.dirs = ${WEBLOGIC_EXTENSION_DIRS}" "
Export JAVA_OPTIONS
FI
JAVA_OPTIONS = "${JAVA_OPTIONS}"
Export JAVA_OPTIONS
# SET THE CLASSPATH
If ["${WLP_POST_CLASSPATH}"! = ""]; then
If ["${CLASSPATH}"! = ""]; then
CLASSPATH = "${WLP_POST_CLASSPATH} ${CLASSPATHSEP} ${CLASSPATH}.
Export CLASSPATH
on the other
CLASSPATH = "${WLP_POST_CLASSPATH}".
Export CLASSPATH
FI
FI
If ["${POST_CLASSPATH}"! = ""]; then
If ["${CLASSPATH}"! = ""]; then
CLASSPATH = "${POST_CLASSPATH} ${CLASSPATHSEP} ${CLASSPATH}.
Export CLASSPATH
on the other
CLASSPATH = "${POST_CLASSPATH}".
Export CLASSPATH
FI
FI
If ["${WEBLOGIC_CLASSPATH}"! = ""]; then
If ["${CLASSPATH}"! = ""]; then
CLASSPATH = "${WEBLOGIC_CLASSPATH} ${CLASSPATHSEP} ${CLASSPATH}.
Export CLASSPATH
on the other
CLASSPATH = "${WEBLOGIC_CLASSPATH}".
Export CLASSPATH
FI
FI
If ["${PRE_CLASSPATH}"! = ""]; then
CLASSPATH = "${PRE_CLASSPATH} ${CLASSPATHSEP} ${CLASSPATH}.
Export CLASSPATH
FI
If ["${JAVA_VENDOR}"! = "BEA"]; then
JAVA_VM = "${JAVA_VM} ${JAVA_DEBUG} ${JAVA_PROFILE}".
export JAVA_VM
on the other
JAVA_VM = "${JAVA_VM} ${JAVA_DEBUG} ${JAVA_PROFILE}".
export JAVA_VM
FI1, using Sun's JAVA with HP virtual machine? Why not change to the JVM from HP.
2, if you use the JDK from HP:
Add lines to follow in setDomainEnv.sh
GC_LOG="${DOMAIN_HOME}/bin/${server_name}.GC$$.log".
MEM_ARGS = "- Xms1024m - Xmx1024m"
MEM_ARGS = "${MEM_ARGS}"-XX: NewSize = 256 m - XX: MaxNewSize = 256 m - XX: PermSize = 128 m - XX: MaxPermSize = 256 m - XX: SurvivorRatio = 8 ""
MEM_ARGS = "${MEM_ARGS} - Xoptgc - XX: + PrintGCTimeStamps - XX: + PrintGCDetails - Xloggc: ${GC_LOG}" "
MEM_ARGS = "${MEM_ARGS}"-XX: + UseSpinning - XX: + HeapDumpOnOutOfMemoryError - XX: + HeapDumpOnly ""export MEM_ARGS
3, you can use HPjmeter to monitor your server instance. It can help you find the problem quickly and easily.
-
Run garbage collection operation in AIR - iOS app
Just to be in a bit of a learning curve, develop a Flash application for browser used in a browser and set up with the memory management optimal if all goes well using Flash Professional CS5.5.
Part of the process is to make sure that the object have no reference pointing of the finger when they are made with so much garbage can clean them.
Now, I came to the port of the application on iOS for iPad. My question is... Air for iOS, run the garbage collection?
Thank you
Mark
Yes. and you can manually force garbage collection by calling System.GC() If you use Air 3.0
but try not to rely too much on the gc to solve memory problems... too much to clean up causes a very noticeable lag when running, and it does not work in any foreseeable calendar I can say... If your memory get is too high, your application can be ejected and crash.
something to keep in mind, recycle and pool objects and varibles as much as you possibly CAN... try using the NEW keyword as little as possible... then all killed during a phase transition or loading followed a system.GC() if the offset is not noticeable.
-
"Garbage collect from."
Hello:
Have we never saw the message "Garbage collect from" on the JDE title bar when Simulator starts up.
It lasted all night.
And I also tried to change the model of simluator, the problem still exists.
Thank you!
Thanks Mark, it works now
-
How to prepare list for garbage collection after drag and drop operation
Hi all
I have a view in a mobile application that contains a list with the help of drag / move. The problem I encounter is that the NativeDragManagerImpl maintains a reference to this list in its _dragInitiator and _relatedObject properties. It is not a memory leak by - say, because the reference will be replaced the next time make drag and drop is used, however, my view that preclude any garbage collection, causing an unacceptable peak memory.
Here is an example which illustrates the problem (app default AIR using Flex 4.5.1):
Main.MXML
<?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:local="*" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark" width="800" height="600"> <fx:Script> <![CDATA[ protected function start_clickHandler(event:MouseEvent):void { var element:ListGroup = new ListGroup(); this.panel.addElement(element); } protected function stop_clickHandler(event:MouseEvent):void { this.panel.removeAllElements(); } ]]> </fx:Script> <s:Panel id="panel" top="100" left="100" bottom="100" right="100" title="Drag Drop Test"> <s:controlBarContent> <s:Button label="Start" click="start_clickHandler(event)" /> <s:Button label="Clear" click="stop_clickHandler(event)" /> </s:controlBarContent> </s:Panel> </s:WindowedApplication>
ListGroup.mxml
<?xml version="1.0" encoding="utf-8"?> <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark" width="100%" height="100%"> <s:layout> <s:HorizontalLayout /> </s:layout> <s:List id="sourceList" width="100%" height="100%" dragEnabled="true" dragMoveEnabled="true" dropEnabled="true"> <s:dataProvider> <s:ArrayCollection> <fx:String>Item 1</fx:String> <fx:String>Item 2</fx:String> <fx:String>Item 3</fx:String> <fx:String>Item 4</fx:String> </s:ArrayCollection> </s:dataProvider> </s:List> <s:List id="targetList" width="100%" height="100%" dragEnabled="true" dragMoveEnabled="true" dropEnabled="true"> </s:List> </s:Group>
If you drag items to the list on the right, there is always at least one instance of ListGroup stuck in memory for the duration of execution (as seen in the profiler).
Is there a way to perform cleanup on the DragManager (or in fact the underlying DragManagerImpl) upward to a time of my choosing? Thoughts or ideas will be greatly appreciated!
Thanks a lot for your time!
I think I'd be monkey-patch NativeDragManagerImpl. And create a bug report.
-
Script for garbage collection in Captivate 4 Widgets?
Hi guys and girls
I'm having a problem with some custom widgets that I made. I have a number of widgets on every slide in my project (which are reused on each slide) and they work fine... BUT I noticed that when the project is published and played the executable starts eats more RAM. I noticed that the EXE eats more RAM at the beginning of each slide and never decreases.
I think what is happening is that even though im using the same widget on each slide, Captivate load a new instance of the widget to each new slide and no garbage collection on the previous slide widgets. Does anyone know of an ActionScript command in order to solve this problem? Or a work around?
A question for adobe... Do you know the guys on this problem? and if yes, do you intend to fix in an update?
See you soon
Aquil0
Hi Aquilo,
The reason for the consumption of RAM is usually because something in your code has not been unloaded, always raises an event or a timer still work and Captivate continues to run and store it in memory, despite a change of the slide or the off-screen image disappear.
Best option is to add a feature to "unload" to your flash widget that will destroy everything.
Here is an example applied to a loader (Actionscript 3) object
loader.addEventListener (Event.UNLOAD, unLoadHandler);
function unLoadHandler(event:Event):void {}
Kill the charger
var loader: Loader = Loader (event.target);
Loader.Unload ();
Charger = null;Remove event listeners
this.removeEventListener ("onEnterFrame", onEnterFrame);
this.loader.removeEventListener (Event.UNLOAD, unLoadHandler);Stop all timers
Timer.Stop ();
}Note how I put the "loader", NULL, after unloading it - this will ensure it comes out of the memory, as Flash Player 9 has an error where it won't completely remove something of memory, although it is being unloaded.
Hope that helps.
-
Garbage Collection, external swf and XML
I did tons of research on the AS3 garbage collection. I have a decent knowledge of it, but I CAN'T find any info about the deletion of xml data. The worst thing is, I have no control over the version of the file (AS2 or AS3) swf file I'm loading. Unfortunately, I'm loading AS2 swf (with an outside provider that will not show you any code) in a film of AS3. When I run garbage collection, the data from the xml file / is not deleted and I can't understand how get rid of it. The problem is, once a file is loaded which calls an xml file, no other files cannot load an xml.
If anyone knows how to clear the XML, please fill me in.
Thank you!
Heather
The code is:**************UPDATE*************************************
Hey people,
Good news. I just read an announcement of Grant Skinner regarding what my problems were.
For more details, go to his blog @ http://www.gskinner.com/blog/archives/2008/07/unloadandstop_i.html
Be sure to read the update as well.
See you soon,.
Heather
-
Question on the impact of Garbage collection
I get messages in the log as below...
2009-09-09 14:33:21.677/691.607 Oracle coherence EE 3.5/459 < D5 > (thread = PacketPublisher, Member = 4): experienced a delay of communication ms 538 (GC distance likely) with Member (Id = 7, Timestamp is 14:24:51.312 2009-09-09, address = 10.0.0.205:8094, MachineId = 2765, location = site: server07, process: 10125, role = ServerContainer); 22 packages reprogrammed, PauseRate = 0.0010, threshold = 1976
In the case above Member 4 is an active storage node and Member 7 is not.
Basically, it runs a distributed cache, in a client/server operation.
I understand that this basically means consistency server is waiting to communicate to the customer and cannot due to the garbage collection operation.
This is perfect, we expect in this scenario, the client JVM to have breaks from garbage collection, we cross GC optimization at the moment.
To get to the question later :) Does this mean that this node is unable to communicate to other nodes of customer for 538ms? And so the customer break GC affects consistency server node and therefore all client nodes?
I expect the cache to always respond to requests to take, but if there is only one responsible for thread of the publication of the packages to clients (as indicated by the name of the thread) so I can't imagine it would be blocked.
I don't see anything specific in the forums about this. I found the following
"Although it is quite possible to see the log messages indicating that a cache server" has experienced behind communication ", these messages are generated by the TCMP layer and have no impact on the responsiveness of cache to requests for other customers service." ""
But wasn't 100% sure that it meant no effect, or no impact on making queries.
Thank you
SteveThis means that this node will be suspended during this period.
Of course other nodes will be able to continue, but if you do something that affects this node he asks should wait (for example, the aggregation on all nodes).
However, if you have found (for example) an object of key to another node that will be just fine.
There are many solutions to these problems, but all can take a huge amount of time.
(1) by using CG (parallel) differential ParNew
(2) using the experimental (parallel) GC G1 in JDK6_14 but ready to use in JDK7. I read an article on Chicago Board of Options Exchange using it wisely.
(3) to aid in time real Sun JVM
(4) to aid Oracle's JRockitBest, Andrew.
-
Does garbage collection occurs in the region of PERM of Java Heap?
Hi guys,.
I am a new Member to this forum, my name is Javin Paul and I'm a Java programmer. I have a question related to the garbage collection in Java
Does garbage collection occurs in the region of PERM of Java Heap?
According to my knowledge PERM area is used to store metadata about classes, methods, variable etc also string Pool created in PERM area of the heap, so I believe that garbage do not occur in this place, but I just wanted to know what you guys think of it?
Thank you
HervéBasics segment of memory and so on that you are used to, do not apply the FMV of Blackberry - well they probably not, but it is well hidden from us. I recommend you check out this video to understand what you can control re garbage collection operation.
-
Restarting the device on the garbage collection
Hello
I created an application that performs the following operations:
- Read an email address of a BasicEditField that an end user will be input.
- Convert this string to an object of net.rim.blackberry.api.mail.Address
- Persist the object address by doing a commit sync
- Read the persistent object even to intervals and use it to send email.
I am able to record the e-mail to the PersistentStore address. When I get out my app running (for sending electronic mail timed) so the device restarts. After a reboot, the device remains stable and emails come out because they are supposed to.
I am now able to reproduce this exact behavior if I first enter the e-mail address, it persists and call a GC (garbage collection). As soon as I do this, the device restarts. As a tip, I also did a forceCommit() rather than a commit() and there is no difference.
I tested the following physical devices:
Bold 9700 - v5.0.0.862 (1446 Bundle, platform 5.1.0.175)
Torch 9800 - v6.0.0.246 (695 Bundle, platform 6.4.0.150)
The same behavior is exhibited in both devices.
I don't think any of you have already encountered this? I was not able to understand why this is happening and it has been driving me crazy. If you've seen behavior like this and have either thought about it or not, please answer. Thank you!
Imagine that... Address is not persistent. Could have fooled me because once or twice, the program worked by reading the object address of is. The behavior seems to be inconsistent. I have changed my address object in a string and now everything works fine.
-
How different modes of garbage collection?
On http://na.blackberry.com/eng/devjournals/resources/journals/jan_2005/garbage_collection.jsp#programm... there are two modes of GC listed, but only a single API to perform the full pass. Is it possible to run a past further by programming? Thank you!
As I said, the only way that you are able to instruct the JVM garbage collection is through the System.gc method. There is no other way around it - this, I think, is the same thing with J2SE as well.
-
If the garbage collector is called by an application, it works in the background or in the thread called? Is it possible to profile in the JDE memory while an application is running?
I think that you will find this video very useful. He explains more about the garbage and shows the determination of the characteristics.
Garbage Collection
http://www.BlackBerry.com/DevMediaLibrary/view.do?name=GarbageCollection
Maybe you are looking for
-
Apple Watch not advise with haptics during incoming calls
Hi, my Apple Watch is not advising me with haptics for incoming calls. When I see the call on my phone and check my watch, I see appear on my Apple Watch face, but not with haptics the incoming call. I have the latest iOS on my iPhone 6 (9.3.4) and o
-
I have the Scroll Bar in bookmarks are gone now can it get replaced
The scroll bar is now missing when I click the icon of bookmarks instead he is just an arrow down. I have a lot of Favorites and now it takes forever to get to the bottom where are my most recent. Please add the scroll bar option. Thank you!
-
I'm under Synology Cloudstation backup photos to a Synology NAS to my MacBook Pro and I get as an authorization error of repeated access associated 2 files .lisj in the Cloudstation newspaper. I searched high and low, and I can't find any info on the
-
c:\windows\winsxs\x86_microsoft. VC80.crt_... and so on is not designed to run on windows or it contains an error. Try to install the program using original install.
-
Cuando enciendo mi lapto is demora en open too y además is me desaparece el puedo hacer area
Cuando enciendo mi lapto is demora en open too y además is me desaparece el puedo hacer area?