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
FI

1, 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.

Tags: Fusion Middleware

Similar Questions

  • "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

  • 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.

    http://US.BlackBerry.com/developers/choosingtargetos.jsp#.

  • Restarting the device on the garbage collection

    Hello

    I created an application that performs the following operations:

    1. Read an email address of a BasicEditField that an end user will be input.
    2. Convert this string to an object of net.rim.blackberry.api.mail.Address
    3. Persist the object address by doing a commit sync
    4. 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.

  • Garbage collection

    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

  • 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.

  • 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.

  • Issue of garbage collection

    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)

  • Some Garbage Collection issues

    I searched the Garbage Collection, and I still have some doubts. Consider the following code:

    var objt:Sprite = new Sprite();

    var child: Sprite = new Sprite();

    stage.addChild (obj);

    obj.addChild (child);

    obj.addEventListener (MouseEvent.MOUSE_DOWN, onMouseDown, false, 0, true);

    child.addEventListener (MouseEvent.MOUSE_DOWN, onMouseDown, false, 0, true);

    Suppose I want to get rid of (delete, delete, destroy, purge, KILL >: D) everything about obj (itself, its events, its children and its event listeners listeners). Is the following code enough? :

    stage.removeChild (obj);

    obj.removeEventListener (MouseEvent.MOUSE_DOWN, onMouseDown);

    Delete obj;

    Yes.  shortly after this code executes both obj and child will be gc would have.

  • Delete / external swf or the files in the flash file main to unload and load a new swf file and memory garbage collection.

    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);

  • 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

  • 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
    Charles

    Not 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:

Maybe you are looking for