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.
Tags: Adobe Captivate
Similar Questions
-
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.
-
Forcing a garbage collection?
I am currently checking the memory usage of a script, but even after removal of the classes, the use of memory not to let down and even keep it as new instances are created (and then removed). In my view, thit is because even these instances are eligible for garbage collection is not the case because there is no need to release the memory of new instances... How many times garbage collection operation occurs? Is there a way to force garbage collection usign AS3 so I can check if my code is really remove instances?You can use the code below to force a garbage collection. (to end the loop when no loner necessary):
-
Hello
Let's say you create a dynamic movieClip and also dynamically add an event listener. Then you addChild clip.
Now comes the time to get rid of it - you want to get rid of the object and its event listener.
Would be...
removeChild (my_mc);
my_mc = null;remove the object, and it is the event listener, or would need to also add:
my_mc. removeEventListener (MouseEvent.CLICK, doWhatever);
What I'm trying to do is to have a close button on each movieclip that when clicked, performs a function to remove the clamp and his children to appear and also remove references to it so that it can be ready for garbage collection.
Thank you
Shaun
Hi shaun
Yes, you should not remove the event listener yourself unless you use a 'low' (5th argument of addEventListener set to true)
-
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.
-
Scripts for data cleansing Perf
Hello
We currently use BB 4.4 with the new features enabled PERF. Someone at - it scripts for cleaning or truncate the Perf Data collected? 4.5 is supposed to have the function programmed in. We run the BB server on unix.
Perf Data under the $BBHOME / bbvar / perf
The files are in plain text with lines like this:
Here is a not so elegant way to truncate your files in perl. You will need to set the time as a unix timestamp.
#Purge $BBPERF
@files = "grep - Rl. $BBPERF / *';"$file (@files) {} foreach
chomp ($file);
Print "$file\n";
@data ='cat $file | AWK ' {if (\$4 > = $startTime) {print \$0}} ";
If (!) () open (FILE, "> $file"))) {print "cannot open $file: $!"} \n » ; print LOGFILE "cannot open $file: $! \n » ; next ;}
foreach $line (@data) {print FILE $line ;}
Close the FILE;
} -
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.
-
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.
-
I can't delete / unload the example swf files external when the carousel.swf (portfolio) appears and press the button about the content overlaps the carousel (portfolio). How can I delete / unload an external swf file in the main flash file and load a SWF, so that at the same time remove garbage collection memory operation?
This is the error messages I receive: "TypeError: Error #2007: child parameter must be non null.»
at flash.display::DisplayObjectContainer/removeChild()
" to index_fla::MainTimeline/Down3().
Import nl.demonsters.debugger.MonsterDebugger;
var d: MonsterDebugger = new MonsterDebugger (this);
stage.scaleMode = StageScaleMode.NO_SCALE;
internship. Align = StageAlign.TOP_LEFT;
stage.addEventListener (Event.RESIZE, resizeHandler);
is the charger for the portfolio page swf
var loader: Loader;
var loader2:Loader;
var loader3:Loader;
var loader1:Loader;
resize the content
function resizeHandler(event:Event):void {}
resizes the portfolio page to Center
Loader.x = (stage.stageWidth - loader.width) *. 5;
Loader.y = (stage.stageHeight - loader.height) *. 5;
resizes on page to Center
loader3.x = (stage.stageWidth - 482) *.5 - 260;
loader3.y = (stage.stageHeight - 492) *.5 - 140;
* loader2.x = (stage.stageWidth - 658.65) *. 5;
loader2.y = (stage.stageHeight - 551.45) *. 5; * /
}
addEventListener (Event.ENTER_FRAME, onEnterFrame, false, 0, true);
function onEnterFrame(ev:Event):void {}
var requesterb:URLRequest = new URLRequest ("carouselLoader.swf");
Charger = null;
loader = new Loader();
Loader.Name = "carousel1.
Adds gallery.swf in the scene at the beginning of the film
loader.contentLoaderInfo.addEventListener (IOErrorEvent.IO_ERROR, ioError);
function ioError(event:IOErrorEvent):void {}
trace (Event);
}
try {}
Loader.Load (requesterb);
} catch (SecurityError: error) {}
trace (Error);
}
addChild (loader);
Loader.x = (stage.stageWidth - 739) *. 5;
Loader.y = (stage.stageHeight - 500) *. 5;
stopover gallery.swf duplication and more on enter frame
removeEventListener (Event.ENTER_FRAME, onEnterFrame);
}
PORTFOLIO BUTTON
Add eventlistner so that gallery.swf can be loaded
MovieClip (root),.nav.portfolio.addEventListener (MouseEvent.MOUSE_DOWN, down, false, 0, true);
function Down(event:MouseEvent):void {}
Re add listener for contact.swf and about.swf
MovieClip (root).nav.info.addEventListener (MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
MovieClip (root).nav.about.addEventListener (MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
discharge of entry gallery.swf frame if users press portfolio in nav button
var applicant: URLRequest = new URLRequest ("carouselLoader.swf");
Charger = null;
loader = new Loader();
Loader.Name = "carousel."
loader.contentLoaderInfo.addEventListener (IOErrorEvent.IO_ERROR, ioError);
function ioError(event:IOErrorEvent):void {}
trace (Event);
}
try {}
Loader.Load (requester);
} catch (SecurityError: error) {}
trace (Error);
}
addChild (loader);
Loader.x = (stage.stageWidth - 739) *. 5;
Loader.y = (stage.stageHeight - 500) *. 5;
removeChild (getChildByName ("about"));
removeChild (getChildByName ("carousel1"));
delete eventlistner and prevents duplication of the gallery.swf
MovieClip (root).nav.portfolio.removeEventListener (MouseEvent.MOUSE_DOWN, down);
}
INFORMATION BUTTON
Add eventlistner so that info.swf can be loaded
MovieClip (root).nav.info.addEventListener (MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
function Down1(event:MouseEvent):void {}
This adds the EventListener for portfolio so that the end user can re-post if they wish.
MovieClip (root),.nav.portfolio.addEventListener (MouseEvent.MOUSE_DOWN, down, false, 0, true);
MovieClip (root).nav.about.addEventListener (MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
var applicant: URLRequest = new URLRequest ("contactLoader.swf");
loader2 = null;
loader2 = new Loader();
loader2. Name = "contact".
loader2.contentLoaderInfo.addEventListener (IOErrorEvent.IO_ERROR, ioError);
function ioError(event:IOErrorEvent):void {}
trace (Event);
}
try {}
loader2. Load (requester);
} catch (SecurityError: error) {}
trace (Error);
}
addChild (loader2);
loader2.x = (stage.stageWidth - 658.65) *. 5;
loader2.y = (stage.stageHeight - 551.45) *. 5;
delete eventlistner and prevents duplication of the info.swf
MovieClip (root).nav.info.removeEventListener (MouseEvent.MOUSE_DOWN, Down1);
}
ON THE BUTTON
Add eventlistner so that info.swf can be loaded
MovieClip (root).nav.about.addEventListener (MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
function Down3(event:MouseEvent):void {}
This adds the EventListener for portfolio so that the end user can re-post if they wish.
MovieClip (root),.nav.portfolio.addEventListener (MouseEvent.MOUSE_DOWN, down, false, 0, true);
MovieClip (root).nav.info.addEventListener (MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
var applicant: URLRequest = new URLRequest ("aboutLoader.swf");
loader3 = null;
loader3 = new Loader();
loader3. Name = "a connection"
loader3.contentLoaderInfo.addEventListener (IOErrorEvent.IO_ERROR, ioError);
function ioError(event:IOErrorEvent):void {}
trace (Event);
}
try {}
loader3. Load (requester);
} catch (SecurityError: error) {}
trace (Error);
}
addChild (loader3);
loader3.x = (stage.stageWidth - 482) *.5 - 260;
loader3.y = (stage.stageHeight - 492) *.5 - 140;
removeChild (getChildByName ("carousel"));
removeChild (getChildByName ("carousel1"));
delete eventlistner and prevents duplication of the info.swf
MovieClip (root).nav.about.removeEventListener (MouseEvent.MOUSE_DOWN, Down3);
}
Stop();
You call unload() on objects that you cancelled - where the error.
You should do something like:
{if (loader2)}
loader2. Unload();
}
As for the null value passed into the function - null is a default value. In this way, you can call the low past nothing:
Down()
Or you can use it as a handler in which case it will be called by the Auditor:
Down (mouseEventInstnace);
-
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
-
Associative array and Garbage Collection
Hi all
is there any concept of garbage collection in the use of an associative array?
When I create an associative object instance is there any provision in oracle to release and drop this object
in memory after use?
Thank you
CharlesNot sure; Why would you want to?
Oracle manages this kind of thing very well; It is not something I've ever had to consider, really. Even if Oracle does not clear the memory allocated immediately, I am sure that it is marked as available for reuse.
-
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:
-
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.
-
Mode script for ANY c ++ function
Hi all
My goal was to use the pxi 5406 to implement features of frequency sweep. Right now, we use only the functions on the list of the frequencies of creation. There are four modes of release for the frequency list, signle, continuous, step by step and burst. We use the bleachers through fashion. It is painful to use this mode, since for each frequency, you need to send a rising edge, so if I have several hundred, it means I have to produce this amount of rising edges. This will generate a lot of buffer in another analog card.
My question is, could I use script for the frequency list view? Or is there a smart way to achieve this? From the file of signal aid, he said that there are some c programe on script mode. But I can't find any examples in my computer. If you have any other, could you send me?
Thank you very much.
.Yami.
Yami,
The 5406 has the ability to run script mode. Only for her output modes are Standard function and frequency list. However, I believe that you can do what you want to do with the list mode frequencies. Assuming that you do not want to trigger you can put the camera in single or continuous Mode. Single will play your select frequency scan and then once completed, build:
Continuous is similar, but you continue to repeat the signals to stop:
All the above details are in aid of signal generators of NOR. I looked under the heading devices > 5406 > trigger > triggering Modes.
With simple or continuous, you can specify the length of the waveform step, which could be a good starting point. With regard to the examples for c ++, I do not have, but if you look in the Start Menu, NOR-FGEN, National Instruments, examples, OR-FGEN C examples you can find a folder for "Sweep generator", there is a model and an example C you can look over your program after. I hope this helps!
-
"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
Maybe you are looking for
-
Why Firefox 29 is laggy for me?
Hi, since I updated to FF 29, my browser has gotten unbearably laggy/choppy. If I type, letters appear slower I hit the keys and if I move my mouse over a link, it takes a second or two before the link decorative effect (underscore, nail, etc.) appea
-
can someone let me know how to look for a caller to vi. IE I have abc.vi and I want to know what other vi call this abc.vi. How can we find out who called abc.vi? Thank you
-
I need help to remove a program that focused on my computer, it is called Apache Tomcat 6
I searched my computer and regestry for any sign of Apache Tomcat, but found nothing. When I go online my home page (MSN) will not open. It opens to Apache Tomcat 6. I have reset the internet homepage and noting that tried to help. I tried to go
-
I had this problem for awhile now. After I receive and send the error report my computer is blocked and I have to finish by WTM. I tried to start in safe mode and it was ok there and when I restarted in normal mode it was ok for the rest of the day,
-
Ink cartridge problem - all inks to color, installed by the printer does not print
Remember - this is a public forum so never post private information such as numbers of mail or telephone! Ideas: You have problems with programs Error messages Recent changes to your computer What you have already tried to solve the problem