Operator interface memory leak

Hello,
Sorry, but my English is not very good.
I have a big problem with my Interface Operator. The memory used by the executable increases according to executions.
I joins(contacts) the code of my Interface Operator.
  Thank you in advance for your help(assistant), because I am really clamped...
Larthomas Freddy
Développeur Labview TestStand
Attachments:
OI.zip ‏926 KB

Hello,
Thanks for coming to National Instruments Discussion Forum.
Can you give us more details about your application? Basically, I can’t find your main VI for your User Interface. Can you also give us the different steps to do to run your application and reproduce your problem?
Generally speaking, your code on your block diagram have to be displayable in one screen.
Benjamin R.
R&D Software Development Manager
http://www.fluigent.com/

Similar Messages

  • External interface memory leak?

    Hello,
    I am embedding the flash player inside a Visual C++
    application. My program uses the external interface extensively.
    The external interface is called several times a second ( ~20 fps )
    each time a ~1k XML string is passed to the flash player.
    During execution the program increases its memory by ~10 Mega
    each hour. I have used the Umdh tool to try to locate the problem.
    It points to the line where the container program uses the external
    interface to call a function inside the swf movie.
    Below is a typical output of the Umdh tool:
    + 3396588 ( 3405883 - 9295) 261991 allocs BackTrace12EF
    + 261276 ( 261991 - 715) BackTrace12EF allocations
    ntdll!RtlpNtMakeTemporaryKey+000074D0
    ntdll!RtlInitializeSListHead+00010D08
    ntdll!wcsncat+00000224
    FlDbg9c!DllUnregisterServer+0010261A
    FlDbg9c!DllUnregisterServer+0010263C
    FlDbg9c!DllUnregisterServer+0000F1B7
    myProgram!CZFlash::CallFunction+0000004D (c:\documents and
    settings\amit\my documents\visual studio projects\ myProgram
    \zflash\zflash.cpp, 255)
    myProgram!MainDialogProc+000012A2 (c:\documents and
    settings\amit\my documents\visual studio projects\ myProgram
    \w32\maindlg.cpp, 2324)
    USER32!GetDC+0000006D
    USER32!PrivateExtractIconExW+000002B2
    USER32!PrivateExtractIconExW+000000FE
    USER32!DefDlgProcW+00000022
    USER32!GetDC+0000006D
    USER32!GetDC+0000014F
    USER32!IsWindowUnicode+000000A1
    USER32!CallWindowProcW+0000001B
    COMCTL32!Ordinal11+00000328
    COMCTL32!RemoveWindowSubclass+0000017E
    COMCTL32!DefSubclassProc+00000046
    COMCTL32!Ordinal389+000028DF
    COMCTL32!RemoveWindowSubclass+0000017E
    COMCTL32!DefSubclassProc+00000046
    COMCTL32!Ordinal389+000028DF
    COMCTL32!RemoveWindowSubclass+0000017E
    COMCTL32!DefSubclassProc+00000046
    COMCTL32!Ordinal389+000028DF
    COMCTL32!RemoveWindowSubclass+0000017E
    COMCTL32!DefSubclassProc+00000046
    COMCTL32!Ordinal389+000028DF
    COMCTL32!RemoveWindowSubclass+0000017E
    COMCTL32!DefSubclassProc+00000046
    COMCTL32!Ordinal389+000028DF
    The System.totalMemory value of the flash player ranges from
    2.2 Mbyte to 3.2. I tried using memory leak detection software like
    IBM's Purify but couldn't find the problem.
    I also tried to disable the BSTR caching by setting the
    environment variable OANOCACHE, but the memory of my program
    continues to increase.
    Below is my C++ code. The m_iflash object is a pointer to the
    ActiveX of the flash player.
    wstring CZFlash::CallFunction(wstring call_string)
    BSTR pcall_string = SysAllocString(call_string.c_str());
    BSTR presponse = NULL;
    HRESULT status = m_iflash->CallFunction(pcall_string,
    &presponse);
    SysFreeString(pcall_string);
    if (status != S_OK)
    if (presponse != NULL)
    SysFreeString(presponse);
    return L"";
    wstring sresponse(presponse);
    SysFreeString(presponse);
    return sresponse;
    Currently the swf movie contains only action script that
    displays the System.totalMemory value and an empty function that
    the external interface calls.
    Any help will be appreciated.
    Thanks in advance,
    Amit

    Hello,
    Thanks for coming to National Instruments Discussion Forum.
    Can you give us more details about your application? Basically, I can’t find your main VI for your User Interface. Can you also give us the different steps to do to run your application and reproduce your problem?
    Generally speaking, your code on your block diagram have to be displayable in one screen.
    Benjamin R.
    R&D Software Development Manager
    http://www.fluigent.com/

  • Memory leak in external interface SetReturnValue?

    I'm having trouble with a memory leak in my application. I'm
    hoping someone out there can help me find a fix or workaround, or
    tell me what I'm doing wrong.
    The leak seems to be coming from the flash external
    interface; specifically, IShockwaveFlash.SetReturnValue(String). My
    application is written in Visual Basic 2008, connecting to Flash
    9.0.124.0 (activex version).
    I've written a fairly simple flash/VB program pair to
    illustrate the problem.
    The SWF contains a button, 2 dynamic text fields, and the
    ActionScript 2 code below.
    The VB project contains a Form with a AxShockwaveFlash object
    and the VB code below.
    When this program is run, and the button is clicked a lot
    (10's of thousands of times), the application's memory creeps up
    and never seems to fall back down. If the string passed to
    SetReturnValue is longer, memory is consumed faster. But if the
    call to SetReturnValue is commented-out, the application's memory
    usage remains stable.
    If anyone has any suggestions on how to proceed, I'd be
    grateful.
    (By the way: I'm using a freeware program called DoItAgain to
    automate the button pressing.)

    I have developed two simple Java and corresponding
    C++ classes. Use code tags when you post your code.
    You are missing a lot of error checking. JNI calls, every single one, will usually be followed by some sort of error checking. Any that access classes, methods, fields or allocate object must be followed by checks for java exceptions.
    You will need to reduce your code to a smaller sample. Otherwise it is unlikely anyone will look at it.
    You also need to specify how you know that a memory leak is occurring.

  • Memory Leaks in JMS C Interface

    Hello,
              I am experiencing a memory leak while invoking the JmsConsumerReceive()
              as a synchronous call (blocking) in a loop. I am running against
              Weblogic 8.1 with wljmsclient.jar and wlclient.jar in the CLASSPATH. We
              are using a Topic. Every Producer and Consumer has their own Session.
              I have a test case reduced to the pseudocode below:
              for 1 to 100 do {
              JmsConsumerReceive(jmsConsumerPtr, 0, &jmsMessage, 0);
              JmsMessageDestroy(jmsMessage, 0);
              An entirely different process is doing the sends to the topic. We seem
              to be losing 240K every 100 messages. What am I doing wrong? Do we
              need to crawl around inside the message doing things like using
              JmsTextMessageGetText() to grab the JmsString struct so we can free its
              members? The example in the JAR file is very spotty when it comes to
              memory mangement. It appears that JmsMessageDestroy() does not suffice.
              But also doing a free on jmsMessage crashes the process.
              Unfortunately, we are calling out from a different VM, so our ability to
              debug the API code is limited.
              It seems that some sort of Java objects are being created and sticking
              around. I thought that there may be some exceptions, but using
              JmsGetLastException() in this situation doesn't turn anything up.
              What am I missing?
              --PKS                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    While I don't know where the memory leak is, you might try narrow down the problem by using the full "weblogic.jar" instead of "wljmsclient.jar+wlcient.jar" and a URL that starts with "t3". This enables a faster, lighter-weight protocol than the thin client jars use, and it would be interesting to see if it fixes the memory leak.
              Tom, BEA

  • Memory leak due high database operations

    Our application is a network monitoring application , where we get lot of data from network every 2 minutes.
    When we try process large amount data in our application we start seeing memory leak. But if we control data inflow rate , then our application works fine with no leak.
    I am not able to profile our application with tools like Jprobe, as the profiler itself is running outofmemory even before I could reproduce the issue.
    Mostly likely DB is not able to handle the data at the rate we would like it to handle. We are using MySql with C3P0.
    I am not sure which objects are not getting garbage collected which is causing our application to run outofmemory since i am not able to profile the application.
    Will appreciate if anyone can share their experiences in debugging such problems

    We have added throttling mechanism to temporarily fix the problem. As I said before we get data every 2 mins from network. We have a data structure which is populated when we receive the data. So we count the numbers of rows in the data structure and once we reach the throttle we drop rest of the data. Throttle gets reset so that when data comes in next cycle we can again process it.
    The problem is we are not able handle data at a higher rate. Most of the times data received from the network is within our throttle limit , so there are no issues. We were seeing issues only when receive burst of data. So if we fixed the issue temporarily by adding throttling.
    I hope this clarifies your question

  • Memory leak in Digital Waveform

    I have a program with a pretty serious memory leak that uses up all my system RAM and crashes my computer within a few hours of running the program.
    The program takes an array of U16s where each bit represents a digital signal. The VI converts each U16 to a digital array and groups the resulting 16 digital signals into different busses for display on a Digital Waveform Graph. The profiler doesn't show any excessive memory usage in the VI. I put the whole VI into a Diagram Disable structure and moved a few pieces out at a time, and eventually the only thing inside the disable structure was the Digital Waveform Graph indicator. When this indicator is enabled, the memory usage of my system rises slowly and steadily until it uses all available RAM and crashes the system.
    If I replace the Digital Waveform Graph indicator with a cluster, the memory leak still occurs (but much more slowly). I thought using the cluster fixed the leak until I reran the VI overnight while using the cluster instead of the Graph.
    If I stop the VI before all the RAM is used, the RAM will not release until I close LabVIEW entirely. Once LabVIEW closes, the memory is released slowly and exponentially unless I use the "End Process" option in Task Manager.
    This is a continuation of a previous post I made where I thought the memory leak was due to problems transferring data from an FPGA for display.
    I ran the MemLeak vi (attached) on two separate systems, both running LV 2013 SP1, and got the same results. The memory leak is noticeably fast when using the enable structure connected to the Digital Waveform Graph but still present when using the cluster of Digital Waveforms.
    Attachments:
    MemLeak.vi ‏33 KB
    LV shutdown.PNG ‏101 KB

    Thanks for the replies.
    In response to John's points:
    1. The attached VI is a simplification of an FPGA VI that read a fixed number of samples from a DMA FIFO using an FPGA Interface Invoke Method approach. I'm using a card (PXI-7842R) that doesn't allow use of the Acquire Read Region method. In order to allow people without an FPGA card to hopefully see the issue, I replaced it with the for loop. Assuming that this for loop does leak (which I don't believe it does; as altenbach said, it's a fixed size allocation that LV should be able to reuse), why would I see a difference in the leak magnitude depending on which indicator I connect to the array?
    2. I've previously reviewed the document you referenced, and I don't see any errors from it present in my code; do you? I have no global/local variables, strings/arrays displayed on front panel, property nodes, coercion dots, altered memory sizes, resizing/reallocations, etc. I don't see any weird buffer allocations. I used to have the conversion from U16 array to digital waveforms in a subVI but placed it on the same diagram to allow incremental use of the Diagram Disable structure.
    3. The forum post you referenced had many of the items discussed above, plus it was solved using an RT FIFO. I'm not passing data from a producer to a consumer; I'm just displaying acquisition results. I guess you could say I'm processing the data, but I'm really only converting it to a format that the indicator will take; I'm not operating on the data.
    It's good that the leak doesn't show up in 2014, but my SSP runs out in a couple of days; I never got an upgrade to 2014. This is the last item remaining on the development path, and we've already spent ~$4k to upgrade the controllers enough to display the acquisition without dragging down the CPU. I will be in hot water if I spent all that money and then end up having to scrap the display...

  • RMI memory leak

    My program use RMI, and I remark memory leak, then I tried RMI sample from jbuilder6, I modified this sample, to send 1Mb file via RMI.
    I write how much RAM are used
    before 168 mb
    rmiregistry 172Mb used 8 Mb
    RMIserver 189Mb 18 Mb
    RMIclient up to 227Mb 38Mb
    end when RMIclient exit 212Mb where is 23 Mb??? 212-189 ????
    This is my changes, and all program are after that:
    public String getDate() {
    System.out.println("SimpleRMIImpl.getDate()");
    String s=null;
    try {
    InputStream fileIn = new FileInputStream("Readme.txt2");
    byte buff[] = new byte[fileIn.available()];
    int i = fileIn.read(buff);
    s = new String(buff);
    } catch(FileNotFoundException e) {
    e.printStackTrace();
    } catch(IOException e) {
    e.printStackTrace();
    return new String(s);
    All program:
    package com.borland.samples.rmi;
    import java.rmi.*;
    import java.rmi.registry.*;
    import java.rmi.server.*;
    import java.util.Date;
    public class SimpleRMIClient
    public static void main(String[] argv) {
    String serverName = "";
    System.setSecurityManager(new RMISecurityManager());
    if (argv.length != 1) {
    try {
    serverName = java.net.InetAddress.getLocalHost().getHostName();
    catch(Exception e) {
    e.printStackTrace();
    else {
    serverName = argv[0];
    if (serverName == "") {
    System.out.println("usage: java SimpleRMIClient <IP address of host running RMI server>");
    System.exit(0);
    try {
    //bind server object to object in client
    SimpleRMIInterface myServerObject = (SimpleRMIInterface) Naming.lookup("//"+serverName+"/SimpleRMIImpl instance");
    //invoke method on server object
    String d = myServerObject.getDate();
    System.out.println("Date on server is " + d);
    catch(Exception e) {
    System.out.println("Exception occured: " + e);
    System.exit(0);
    System.out.println("RMI connection successful");
    package com.borland.samples.rmi;
    import java.rmi.*;
    import java.rmi.server.UnicastRemoteObject;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.FileInputStream;
    public class SimpleRMIImpl extends UnicastRemoteObject implements SimpleRMIInterface
    public SimpleRMIImpl(String name) throws RemoteException {
    super();
    try {
    Naming.rebind(name, this);
    catch (Exception e) {
    if (e instanceof RemoteException)
    throw (RemoteException)e;
    else
    throw new RemoteException(e.getMessage());
    public String getDate() {
    System.out.println("SimpleRMIImpl.getDate()");
    String s=null;
    try {
    InputStream fileIn = new FileInputStream("Readme.txt2");
    byte buff[] = new byte[fileIn.available()];
    int i = fileIn.read(buff);
    s = new String(buff);
    } catch(FileNotFoundException e) {
    e.printStackTrace();
    } catch(IOException e) {
    e.printStackTrace();
    return new String(s);
    package com.borland.samples.rmi;
    public interface SimpleRMIInterface extends java.rmi.Remote
    public String getDate() throws java.rmi.RemoteException;
    package com.borland.samples.rmi;
    import java.rmi.*;
    import java.rmi.server.UnicastRemoteObject;
    public class SimpleRMIServer
    public static void main(String[] argv) {
    System.setSecurityManager(new RMISecurityManager());
    try {
    SimpleRMIImpl implementation = new SimpleRMIImpl("SimpleRMIImpl instance");
    System.out.println("SimpleRMIImpl ready");
    catch (Exception e) {
    System.out.println("Exception occurred: " + e);
    Can you explain why this program use so much memory?
    Valdas

    Memory Usage and its distribution are done by the JVM....u cannot posibly account for each Mega bit of memory while it is used. Also, the File Copying Operation Involves JVM interacting with the OS which in turn interacts with the peripeherals such as ur harddisk, which are comparetively slower then the Processor speed. So the bottom line is ur same program will work at different RAM levels in diff machines with diff hardwares......If u system is indeed working too much then u can check out and sut down many services that u might have otherwise started...posiiblity of a Virus should not be ruled out either.....and the code itself is no problem at all although u might increase a bit by using some FIleReader, BufferredReader/Writer and other faster Streams.
    Hope it helps,
    Cheers,
    Manja

  • Memory leak in JSpinner implementation (maybe others?)

    Hi,
    I am developing an application using Java and Swing, and have run into some problems with memory leaks. After examining the source code and making an example program (provided below), I can only come to the conclusion that there is a bug in the implementation of JSpinner in Sun Java 1.6.0_03.
    If one uses a custom model with the JSpinner, it attaches itself as a listener to the model. However, it never removes the listening connection, even if the model is changed. This causes the JSpinner to be kept in memory as long as the model exists, even if all other references to the component have been removed.
    An example program is available at http://eddie.dy.fi/~sampo/ModelTest.java . It is a simple swing program that has the JSpinner and two buttons, the first of which writes to stdout the listeners of the original model and the second changes the spinner model to a newly-created model. A sample output is below:
    Running on 1.6.0_03 from Sun Microsystems Inc.
    Listeners before connecting to JSpinner:
      Model value is 0, 0 listeners connected:
    Listeners after connecting to JSpinner:
      Model value is 0, 2 listeners connected:
      1: interface javax.swing.event.ChangeListener
      2: javax.swing.JSpinner$ModelListener@9971ad
    Listeners now:
      Model value is 8, 2 listeners connected:
      1: interface javax.swing.event.ChangeListener
      2: javax.swing.JSpinner$ModelListener@9971ad
    Changing spinner model.
    Listeners now:
      Model value is 8, 2 listeners connected:
      1: interface javax.swing.event.ChangeListener
      2: javax.swing.JSpinner$ModelListener@9971adThis shows that even though the model of the JSpinner has been changed, it still listens to the original model. I haven't looked at other components whether they retain connections to the old models as well.
    In my case, I have an adaptor-model which provides a SpinnerModel interface to the actual data. The adaptor is implemented so that it listens to the underlying model only when it itself is being listened to. If the JComponents using the model were to remove the listening connections, it, too, would be automatically garbage-collected. However, since JSpinner does not remove the connections, the adaptor also continues to listen to the underlying model, and neither can be garbage-collected.
    All in all, the listener-connections seem to be a very easy place to make memory leaks in Java and especially in Swing. However, as I see it, it would be a simple matter to make everything work automatically with one simple rule: Listen to the models only when necessary.
    If a component is hidden (or alternatively has no contact to a parent JFrame or equivalent), it does not need to listen to the model and should remove the connections. When the component is again set visible (or connected to a frame) it can re-add the connections and re-read the current model values just as it does when initializing the component. Similarly, any adaptor-models should listen to the underlying model only when it itself is being listened to.
    If the components were implemented in this way, one could simply remove a component from the frame and throw it away, and automatically any listener-connections will be removed and it can be garbage-collected. Similarly any adaptor-models are collected when they are no longer in use.
    Changing the API implementation in this way would not require any changes to applications, as the only thing that changes are the listener-connections. Currently used separate connection-removing methods should still work, though they would be unnecessary any more. The API would look exactly the same from the view of an application programmer, only that she would not need to care about remnant listening connections. (As far as I can tell, the current API specification would allow the API to be implemented as described above, but it should of course require it to be implemented in such a way.)
    Am I missing something, or is there some valid reason why the API is not implemented like this?
    PS. I'm new to these forums, so if there is a better place to post these reports, please tell me. Thanks.

    Another cognition: It's the following code, that causes the memory to be accumulated:
    obj = m_orb.resolve_initial_references("NameService");
    ctx = NamingContextExtHelper.narrow(obj);For the first 4 calls to this code the memory usage of the nameservice is unchanged. From the 5th to the 8th call, it's increased by approx. 10KB per call. And thenceforward (beginning with the 9th call) it's increasing by approx. 10MB.
    What's going wrong here?

  • Pro*c multithreaded application has memory leak

    Hi there,
    I posted this message a week ago in OCI section, nobody answer me.
    I am really curious if my application has a bug or the pro*c has a bug.
    Anyone can compile the sample code and test it easily.
    I made multithreaded application which queries dynamic SQL, it works.
    But the memory leaks when i query the SQL statement.
    The more memory leaks, the more i query the SQL statement, even same SQL
    statement.
    I check it with top, shell command.
    My machine is SUN E450, Solaris 8. Oracle 9.2.0.1
    Compiler : gcc (GCC) 3.2.2
    I changed source code which is from
    $(ORACLE_HOME)/precomp/demo/proc/sample10.pc
    the sample10 doesn't need to be multithreaded. But i think it has to work
    correctly if i changed it to multithreaded application.
    the make file and source code will be placed below.
    I have to figure out the problem.
    Please help
    Thanks in advance,
    the make file is below
    HOME = /user/jkku
    ORA = $(ORACLE_HOME)
    CC = gcc
    PROC = proc
    LC_INCL = -I$(HOME)/work/dbmss/libs/include
    lc_incl = include=$(HOME)/work/dbmss/libs/include
    SYS_INCL =
    sys_incl =
    ORA_INCL = -I. \
    -I$(ORA)/precomp/public \
    -I$(ORA)/rdbms/public \
    -I$(ORA)/rdbms/demo \
    -I$(ORA)/rdbms/pbsql/public \
    -I$(ORA)/network/public \
    -DSLMXMX_ENABLE -DSLTS_ENABLE -D_SVID_GETTOD
    INCLUDES = $(LC_INCL) $(SYS_INCL) $(ORA_INCL)
    includes = $(lc_incl) $(sys_incl)
    LC_LIBS =
    SYS_LIBS = -lpthread -lsocket -lnsl -lrt
    ORA_LIBS = -L$(ORA)/lib/ -lclntsh
    LIBS = $(LC_LIBS) $(SYS_LIBS) $(ORA_LIBS)
    # Define C Compiler flags
    CFLAGS += -D_Solaris64_ -m64
    CFLAGS += -g -D_REENTRANT
    # Define pro*c Compiler flags
    PROCFLAGS += THREADS=YES
    PROCFLAGS += CPOOL=YES
    # Our object files
    PRECOMPS = sample10.c
    OBJS = sample10.o
    .SUFFIXES: .o .c .pc
    .c.o:
    $(CC) -c $(CFLAGS) $(INCLUDES) $*.c
    .pc.c:
    $(PROC) $(PROCFLAGS) $(includes) $*.pc $*.c
    all: sample10
    sample10: $(PRECOMPS) $(OBJS)
    $(CC) $(CFLAGS) -o sample10 $(OBJS) $(LIBS)
    clean:
    rm -rf *.o sample10 sample10.c
    the source code is below which i changed the oracle sample10.pc to
    multithreaded application.
    Sample Program 10: Dynamic SQL Method 4
    This program connects you to ORACLE using your username and
    password, then prompts you for a SQL statement. You can enter
    any legal SQL statement. Use regular SQL syntax, not embedded SQL.
    Your statement will be processed. If it is a query, the rows
    fetched are displayed.
    You can enter multi-line statements. The limit is 1023 characters.
    This sample program only processes up to MAX_ITEMS bind variables and
    MAX_ITEMS select-list items. MAX_ITEMS is #defined to be 40.
    #include <stdio.h>
    #include <string.h>
    #include <setjmp.h>
    #include <sqlda.h>
    #include <stdlib.h>
    #include <sqlcpr.h>
    /* Maximum number of select-list items or bind variables. */
    #define MAX_ITEMS 40
    /* Maximum lengths of the names of the
    select-list items or indicator variables. */
    #define MAX_VNAME_LEN 30
    #define MAX_INAME_LEN 30
    #ifndef NULL
    #define NULL 0
    #endif
    /* Prototypes */
    #if defined(__STDC__)
    void sql_error(void);
    int oracle_connect(void);
    int alloc_descriptors(int, int, int);
    int get_dyn_statement(void);
    void set_bind_variables(void);
    void process_select_list(void);
    void help(void);
    #else
    void sql_error(/*_ void _*/);
    int oracle_connect(/*_ void _*/);
    int alloc_descriptors(/*_ int, int, int _*/);
    int get_dyn_statement(/* void _*/);
    void set_bind_variables(/*_ void -*/);
    void process_select_list(/*_ void _*/);
    void help(/*_ void _*/);
    #endif
    char *dml_commands[] = {"SELECT", "select", "INSERT", "insert",
    "UPDATE", "update", "DELETE", "delete"};
    EXEC SQL INCLUDE sqlda;
    EXEC SQL INCLUDE sqlca;
    EXEC SQL BEGIN DECLARE SECTION;
    char dyn_statement[1024];
    EXEC SQL VAR dyn_statement IS STRING(1024);
    EXEC SQL END DECLARE SECTION;
    EXEC ORACLE OPTION (ORACA=YES);
    EXEC ORACLE OPTION (RELEASE_CURSOR=YES);
    SQLDA *bind_dp;
    SQLDA *select_dp;
    /* Define a buffer to hold longjmp state info. */
    jmp_buf jmp_continue;
    char *db_uid="dbmuser/dbmuser@dbmdb";
    sql_context ctx;
    int err_sql;
    enum{
    SQL_SUCC=0,
    SQL_ERR,
    SQL_NOTFOUND,
    SQL_UNIQUE,
    SQL_DISCONNECT,
    SQL_NOTNULL
    int main()
    int i;
    EXEC SQL ENABLE THREADS;
    EXEC SQL WHENEVER SQLERROR DO sql_error();
    EXEC SQL WHENEVER NOT FOUND DO sql_not_found();
    /* Connect to the database. */
    if (connect_database() < 0)
    exit(1);
    EXEC SQL CONTEXT USE :ctx;
    /* Process SQL statements. */
    for (;;)
    /* Allocate memory for the select and bind descriptors. */
    if (alloc_descriptors(MAX_ITEMS, MAX_VNAME_LEN, NAME_LEN) != 0)
    exit(1);
    (void) setjmp(jmp_continue);
    /* Get the statement. Break on "exit". */
    if (get_dyn_statement() != 0)
    break;
    EXEC SQL PREPARE S FROM :dyn_statement;
    EXEC SQL DECLARE C CURSOR FOR S;
    /* Set the bind variables for any placeholders in the
    SQL statement. */
    set_bind_variables();
    /* Open the cursor and execute the statement.
    * If the statement is not a query (SELECT), the
    * statement processing is completed after the
    * OPEN.
    EXEC SQL OPEN C USING DESCRIPTOR bind_dp;
    /* Call the function that processes the select-list.
    * If the statement is not a query, this function
    * just returns, doing nothing.
    process_select_list();
    /* Tell user how many rows processed. */
    for (i = 0; i < 8; i++)
    if (strncmp(dyn_statement, dml_commands, 6) == 0)
    printf("\n\n%d row%c processed.\n", sqlca.sqlerrd[2], sqlca.sqlerrd[2] == 1 ? '\0' : 's');
    break;
    /* Close the cursor. */
    EXEC SQL CLOSE C;
    /* When done, free the memory allocated for pointers in the bind and
    select descriptors. */
    for (i = 0; i < MAX_ITEMS; i++)
    if (bind_dp->V != (char *) 0)
    free(bind_dp->V);
    free(bind_dp->I); /* MAX_ITEMS were allocated. */
    if (select_dp->V != (char *) 0)
    free(select_dp->V);
    free(select_dp->I); /* MAX_ITEMS were allocated. */
    /* Free space used by the descriptors themselves. */
    SQLSQLDAFree(ctx, bind_dp);
    SQLSQLDAFree(ctx, select_dp);
    } /* end of for(;;) statement-processing loop */
    disconnect_database();
    EXEC SQL WHENEVER SQLERROR CONTINUE;
    EXEC SQL COMMIT WORK RELEASE;
    puts("\nHave a good day!\n");
    return;
    * Allocate the BIND and SELECT descriptors using sqlald().
    * Also allocate the pointers to indicator variables
    * in each descriptor. The pointers to the actual bind
    * variables and the select-list items are realloc'ed in
    * the set_bind_variables() or process_select_list()
    * routines. This routine allocates 1 byte for select_dp->V
    * and bind_dp->V, so the realloc will work correctly.
    alloc_descriptors(size, max_vname_len, max_iname_len)
    int size;
    int max_vname_len;
    int max_iname_len;
    int i;
    * The first sqlald parameter determines the maximum number of
    * array elements in each variable in the descriptor. In
    * other words, it determines the maximum number of bind
    * variables or select-list items in the SQL statement.
    * The second parameter determines the maximum length of
    * strings used to hold the names of select-list items
    * or placeholders. The maximum length of column
    * names in ORACLE is 30, but you can allocate more or less
    * as needed.
    * The third parameter determines the maximum length of
    * strings used to hold the names of any indicator
    * variables. To follow ORACLE standards, the maximum
    * length of these should be 30. But, you can allocate
    * more or less as needed.
    if ((bind_dp =
    SQLSQLDAAlloc(ctx, size, max_vname_len, max_iname_len)) ==
    (SQLDA *) 0)
    fprintf(stderr,
    "Cannot allocate memory for bind descriptor.");
    return -1; /* Have to exit in this case. */
    if ((select_dp =
    SQLSQLDAAlloc(ctx, size, max_vname_len, max_iname_len)) == (SQLDA *)
    0)
    fprintf(stderr,
    "Cannot allocate memory for select descriptor.");
    return -1;
    select_dp->N = MAX_ITEMS;
    /* Allocate the pointers to the indicator variables, and the
    actual data. */
    for (i = 0; i < MAX_ITEMS; i++) {
    bind_dp->I = (short *) malloc(sizeof (short));
    select_dp->I = (short *) malloc(sizeof(short));
    bind_dp->V = (char *) malloc(1);
    select_dp->V = (char *) malloc(1);
    return 0;
    int get_dyn_statement()
    char *cp, linebuf[256];
    int iter, plsql;
    for (plsql = 0, iter = 1; ;)
    if (iter == 1)
    printf("\nSQL> ");
    dyn_statement[0] = '\0';
    fgets(linebuf, sizeof linebuf, stdin);
    cp = strrchr(linebuf, '\n');
    if (cp && cp != linebuf)
    *cp = ' ';
    else if (cp == linebuf)
    continue;
    if ((strncmp(linebuf, "EXIT", 4) == 0) ||
    (strncmp(linebuf, "exit", 4) == 0))
    return -1;
    else if (linebuf[0] == '?' ||
    (strncmp(linebuf, "HELP", 4) == 0) ||
    (strncmp(linebuf, "help", 4) == 0))
    help();
    iter = 1;
    continue;
    if (strstr(linebuf, "BEGIN") ||
    (strstr(linebuf, "begin")))
    plsql = 1;
    strcat(dyn_statement, linebuf);
    if ((plsql && (cp = strrchr(dyn_statement, '/'))) ||
    (!plsql && (cp = strrchr(dyn_statement, ';'))))
    *cp = '\0';
    break;
    else
    iter++;
    printf("%3d ", iter);
    return 0;
    void set_bind_variables()
    int i, n;
    char bind_var[64];
    /* Describe any bind variables (input host variables) */
    EXEC SQL WHENEVER SQLERROR DO sql_error();
    bind_dp->N = MAX_ITEMS; /* Initialize count of array elements. */
    EXEC SQL DESCRIBE BIND VARIABLES FOR S INTO bind_dp;
    /* If F is negative, there were more bind variables
    than originally allocated by sqlald(). */
    if (bind_dp->F < 0)
    printf ("\nToo many bind variables (%d), maximum is %d\n.",
    -bind_dp->F, MAX_ITEMS);
    return;
    /* Set the maximum number of array elements in the
    descriptor to the number found. */
    bind_dp->N = bind_dp->F;
    /* Get the value of each bind variable as a
    * character string.
    * C contains the length of the bind variable
    * name used in the SQL statement.
    * S contains the actual name of the bind variable
    * used in the SQL statement.
    * L will contain the length of the data value
    * entered.
    * V will contain the address of the data value
    * entered.
    * T is always set to 1 because in this sample program
    * data values for all bind variables are entered
    * as character strings.
    * ORACLE converts to the table value from CHAR.
    * I will point to the indicator value, which is
    * set to -1 when the bind variable value is "null".
    for (i = 0; i < bind_dp->F; i++)
    printf ("\nEnter value for bind variable %.*s: ",
    (int)bind_dp->C, bind_dp->S);
    fgets(bind_var, sizeof bind_var, stdin);
    /* Get length and remove the new line character. */
    n = strlen(bind_var) - 1;
    /* Set it in the descriptor. */
    bind_dp->L = n;
    /* (re-)allocate the buffer for the value.
    sqlald() reserves a pointer location for
    V but does not allocate the full space for
    the pointer. */
    bind_dp->V = (char *) realloc(bind_dp->V, (bind_dp->L + 1));
    /* And copy it in. */
    strncpy(bind_dp->V, bind_var, n);
    /* Set the indicator variable's value. */
    if ((strncmp(bind_dp->V, "NULL", 4) == 0) ||
    (strncmp(bind_dp->V, "null", 4) == 0))
    *bind_dp->I = -1;
    else
    *bind_dp->I = 0;
    /* Set the bind datatype to 1 for CHAR. */
    bind_dp->T = 1;
    return;
    void process_select_list()
    int i, null_ok, precision, scale;
    if ((strncmp(dyn_statement, "SELECT", 6) != 0) &&
    (strncmp(dyn_statement, "select", 6) != 0))
    select_dp->F = 0;
    return;
    /* If the SQL statement is a SELECT, describe the
    select-list items. The DESCRIBE function returns
    their names, datatypes, lengths (including precision
    and scale), and NULL/NOT NULL statuses. */
    select_dp->N = MAX_ITEMS;
    EXEC SQL DESCRIBE SELECT LIST FOR S INTO select_dp;
    /* If F is negative, there were more select-list
    items than originally allocated by sqlald(). */
    if (select_dp->F < 0)
    printf ("\nToo many select-list items (%d), maximum is %d\n",
    -(select_dp->F), MAX_ITEMS);
    return;
    /* Set the maximum number of array elements in the
    descriptor to the number found. */
    select_dp->N = select_dp->F;
    /* Allocate storage for each select-list item.
    sqlprc() is used to extract precision and scale
    from the length (select_dp->L).
    sqlnul() is used to reset the high-order bit of
    the datatype and to check whether the column
    is NOT NULL.
    CHAR datatypes have length, but zero precision and
    scale. The length is defined at CREATE time.
    NUMBER datatypes have precision and scale only if
    defined at CREATE time. If the column
    definition was just NUMBER, the precision
    and scale are zero, and you must allocate
    the required maximum length.
    DATE datatypes return a length of 7 if the default
    format is used. This should be increased to
    9 to store the actual date character string.
    If you use the TO_CHAR function, the maximum
    length could be 75, but will probably be less
    (you can see the effects of this in SQL*Plus).
    ROWID datatype always returns a fixed length of 18 if
    coerced to CHAR.
    LONG and
    LONG RAW datatypes return a length of 0 (zero),
    so you need to set a maximum. In this example,
    it is 240 characters.
    printf ("\n");
    for (i = 0; i < select_dp->F; i++)
    char title[MAX_VNAME_LEN];
    /* Turn off high-order bit of datatype (in this example,
    it does not matter if the column is NOT NULL). */
    sqlnul ((unsigned short *)&(select_dp->T), (unsigned short
    *)&(select_dp->T), &null_ok);
    switch (select_dp->T)
    case 1 : /* CHAR datatype: no change in length
    needed, except possibly for TO_CHAR
    conversions (not handled here). */
    break;
    case 2 : /* NUMBER datatype: use sqlprc() to
    extract precision and scale. */
    sqlprc ((unsigned int *)&(select_dp->L), &precision,
    &scale);
    /* Allow for maximum size of NUMBER. */
    if (precision == 0) precision = 40;
    /* Also allow for decimal point and
    possible sign. */
    /* convert NUMBER datatype to FLOAT if scale > 0,
    INT otherwise. */
    if (scale > 0)
    select_dp->L = sizeof(float);
    else
    select_dp->L = sizeof(int);
    break;
    case 8 : /* LONG datatype */
    select_dp->L = 240;
    break;
    case 11 : /* ROWID datatype */
    case 104 : /* Universal ROWID datatype */
    select_dp->L = 18;
    break;
    case 12 : /* DATE datatype */
    select_dp->L = 9;
    break;
    case 23 : /* RAW datatype */
    break;
    case 24 : /* LONG RAW datatype */
    select_dp->L = 240;
    break;
    /* Allocate space for the select-list data values.
    sqlald() reserves a pointer location for
    V but does not allocate the full space for
    the pointer. */
    if (select_dp->T != 2)
    select_dp->V = (char *) realloc(select_dp->V,
    select_dp->L + 1);
    else
    select_dp->V = (char *) realloc(select_dp->V,
    select_dp->L);
    /* Print column headings, right-justifying number
    column headings. */
    /* Copy to temporary buffer in case name is null-terminated */
    memset(title, ' ', MAX_VNAME_LEN);
    strncpy(title, select_dp->S, select_dp->C);
    if (select_dp->T == 2)
    if (scale > 0)
    printf ("%.*s ", select_dp->L+3, title);
    else
    printf ("%.*s ", select_dp->L, title);
    else
    printf("%-.*s ", select_dp->L, title);
    /* Coerce ALL datatypes except for LONG RAW and NUMBER to
    character. */
    if (select_dp->T != 24 && select_dp->T != 2)
    select_dp->T = 1;
    /* Coerce the datatypes of NUMBERs to float or int depending on
    the scale. */
    if (select_dp->T == 2)
    if (scale > 0)
    select_dp->T = 4; /* float */
    else
    select_dp->T = 3; /* int */
    printf ("\n\n");
    /* FETCH each row selected and print the column values. */
    EXEC SQL WHENEVER NOT FOUND GOTO end_select_loop;
    for (;;)
    EXEC SQL FETCH C USING DESCRIPTOR select_dp;
    /* Since each variable returned has been coerced to a
    character string, int, or float very little processing
    is required here. This routine just prints out the
    values on the terminal. */
    for (i = 0; i < select_dp->F; i++)
    if (*select_dp->I < 0)
    if (select_dp->T == 4)
    printf ("%-*c ",(int)select_dp->L+3, ' ');
    else
    printf ("%-*c ",(int)select_dp->L, ' ');
    else
    if (select_dp->T == 3) /* int datatype */
    printf ("%*d ", (int)select_dp->L,
    *(int *)select_dp->V);
    else if (select_dp->T == 4) /* float datatype */
    printf ("%*.2f ", (int)select_dp->L,
    *(float *)select_dp->V);
    else /* character string */
    printf ("%-*.*s ", (int)select_dp->L,
    (int)select_dp->L, select_dp->V);
    printf ("\n");
    end_select_loop:
    return;
    void help()
    puts("\n\nEnter a SQL statement or a PL/SQL block at the SQL> prompt.");
    puts("Statements can be continued over several lines, except");
    puts("within string literals.");
    puts("Terminate a SQL statement with a semicolon.");
    puts("Terminate a PL/SQL block (which can contain embedded
    semicolons)");
    puts("with a slash (/).");
    puts("Typing \"exit\" (no semicolon needed) exits the program.");
    puts("You typed \"?\" or \"help\" to get this message.\n\n");
    int connect_database()
    err_sql = SQL_SUCC;
    EXEC SQL WHENEVER SQLERROR DO sql_error();
    EXEC SQL WHENEVER NOT FOUND DO sql_not_found();
    EXEC SQL CONTEXT ALLOCATE :ctx;
    EXEC SQL CONTEXT USE :ctx;
    EXEC SQL CONNECT :db_uid;
    if(err_sql != SQL_SUCC){
    printf("err => connect database(ctx:%ld, uid:%s) failed!\n", ctx, db_uid);
    return -1;
    return 1;
    int disconnect_database()
    err_sql = SQL_SUCC;
    EXEC SQL WHENEVER SQLERROR DO sql_error();
    EXEC SQL WHENEVER NOT FOUND DO sql_not_found();
    EXEC SQL CONTEXT USE :ctx;
    EXEC SQL COMMIT WORK RELEASE;
    EXEC SQL CONTEXT FREE:ctx;
    return 1;
    void sql_error()
    printf("err => %.*s", sqlca.sqlerrm.sqlerrml, sqlca.sqlerrm.sqlerrmc);
    printf("in \"%.*s...\'\n", oraca.orastxt.orastxtl, oraca.orastxt.orastxtc);
    printf("on line %d of %.*s.\n\n", oraca.oraslnr, oraca.orasfnm.orasfnml,
    oraca.orasfnm.orasfnmc);
    switch(sqlca.sqlcode) {
    case -1: /* unique constraint violated */
    err_sql = SQL_UNIQUE;
    break;
    case -1012: /* not logged on */
    case -1089:
    case -3133:
    case -1041:
    case -3114:
    case -3113:
    /* �6�Ŭ�� shutdown�ǰų� �α��� ���°� �ƴҶ� ��b�� �õ� */
    /* immediate shutdown in progress - no operations are permitted */
    /* end-of-file on communication channel */
    /* internal error. hostdef extension doesn't exist */
    err_sql = SQL_DISCONNECT;
    break;
    case -1400:
    err_sql = SQL_NOTNULL;
    break;
    default:
    err_sql = SQL_ERR;
    break;
    EXEC SQL CONTEXT USE :ctx;
    EXEC SQL WHENEVER SQLERROR CONTINUE;
    EXEC SQL ROLLBACK WORK;
    void sql_not_found()
    err_sql = SQL_NOTFOUND;

    Hi Jane,
    What version of Berkeley DB XML are you using?
    What is your operating system and your hardware platform?
    For how long have been the application running?
    What is your current container size?
    What's set for EnvironmentConfig.setThreaded?
    Do you know if containers have previously not been closed correctly?
    Can you please post the entire error output?
    What's the JDK version, 1.4 or 1.5?
    Thanks,
    Bogdan

  • APEX 4.1.1 Memory Leak in IE7

    Hi,
    We busy upgrading our apex and db from 3.0/10G to 4.1.1/11.2G and notice that there appears to be a memory leak when using APEX. At one stage we have had IE7 using over a gig of memory.
    When you load or refresh your page IE7 seems to grab on average 2-5MB of memory for each page load. At first we thought it may have been our apps or setup but this also happens when we go to app 4550 page 1 on apex.oracle.com.
    How to replicate:
    Open task manager to view the Memory Usage.
    Using IE7
    1. Go to http://apex.oracle.com/pls/apex/f?p=4550:1
    2. Go back to Task Manager and note the readings once the CPU Usage for iexplore.exe has stablised to 0.
    3. go back to IE7 and press F5
    4. Repeat steps 2-3 and you will see the Memory usage increases.
    We think this maybe due to a few jQuery UI memory leaks within IE7 and thought this bug ticket maybe of interest http://bugs.jqueryui.com/ticket/7666 (Slightly different versions but similiar experiences)
    Could someone else confirm that they also experience the increasing or have had similiar problems and managed to resolve it?
    TBH, it wouldn't be an issue to use another browser like Firefox to access the builder but this also affects the applications if they include APEX standard Javascript and CSS.
    Thanking you in advance.
    Alistair
    Edited by: Alistair Laing on Jun 16, 2012 2:32 PM
    Added Tags

    Alistair Laing wrote:
    Hi,
    We busy upgrading our apex and db from 3.0/10G to 4.1.1/11.2G and notice that there appears to be a memory leak when using APEX. At one stage we have had IE7 using over a gig of memory.
    When you load or refresh your page IE7 seems to grab on average 2-5MB of memory for each page load. At first we thought it may have been our apps or setup but this also happens when we go to app 4550 page 1 on apex.oracle.com.
    How to replicate:
    Open task manager to view the Memory Usage.
    Using IE7
    1. Go to http://apex.oracle.com/pls/apex/f?p=4550:1
    2. Go back to Task Manager and note the readings once the CPU Usage for iexplore.exe has stablised to 0.
    3. go back to IE7 and press F5
    4. Repeat steps 2-3 and you will see the Memory usage increases.
    We think this maybe due to a few jQuery UI memory leaks within IE7 and thought this bug ticket maybe of interest http://bugs.jqueryui.com/ticket/7666 (Slightly different versions but similiar experiences)
    Could someone else confirm that they also experience the increasing or have had similiar problems and managed to resolve it?Anecdotally, yes. Don't have exact steps for replication or precise numbers, but I have noticed this in passing. On the junk that my client considers a PC suitable for web development the typical IE7 memory footprint with the APEX 3.0 builder and several other tabs running is about 52MB. Add APEX 4.1.1 and it climbs constantly until I have to pull the plug when it gets north of 150MB as the PC can't take it.
    As well that I also have Firefox and 4.1.1 is still experimental at that site...
    At the moment I don't have to resolve it and if I did the only option I'd propose is the replacement of IE7.
    VC wrote:
    Look at this http://www.bbc.co.uk/news/technology-18440979
    Alistair Laing wrote:lol @ VC - I dont shop online at work :-D
    I saw that eariler this week. I do agree with the concept though.So take appropriate action: charge extra for IE7 support.
    The amount of work and effort involved in making our website look normal on IE7 equalled the combined time of designing for Chrome, Safari and Firefox.Is entirely accurate. If it's stated as a requirement, itemise it as an extra on the quote.
    Educate management and bean counters: show them the one line of standards-compliant CSS that's all that is necessary in Safari, Chrome, Firefox and Opera (and just possibly in IE8/9/10), how it isn't supported in IE7, and the tortuous hacks and workarounds that are required to get something equivalent working there.

  • DataSocket memory leak problem (2VO0SF00) -- more info?

    When upgrading to LabVIEW 8.5 recently, I noticed the following known issue in the readme file:
    "ID: 2VO0SF00
    DataSocket/OPC Leaks Memory using ActiveX VIs to perform open-write-close repeatedly
    If you call the DataSocket Open, DataSocket Write, and DataSocket Close functions in succession repeatedly, LabVIEW leaks memory. Workaround — To correct this problem, call the DataSocket Open function once, use the DataSocket Write function to write multiple times, and then use the DataSocket Close function."
    Looking back, I think this problem may have been present in previous LabVIEW releases as well, and might be giving rise to a problem that's been dogging me for quite some time (see my thread, "Error 66 with DataSockets", http://forums.ni.com/ni/board/message?board.id=170&thread.id=187206), in addition to general slow/glitchy behaviour when my VI's have been running continuously for a long time. But in order to determine whether or not this issue affects me, and how I should go about fixing it in the context of my own programs, I need a bit more information about the nature of the issue itself and the inner workings of the DataSocket VI's. Any help or insight the community can provide into this would be greatly appreciated!
    Here are my questions:
    It is my understanding from the "known issue" description above that the memory leak happens when you have a DS Open wired to a DS Write wired to a DS Close, all inside a loop (example 1), and that the suggested workaround would be to move the DS Open and DS Close functions out of the loop on opposite sides, wired to the DS Write which remains inside the loop (example 2). Is this correct?
    Does this leak also happen when performing DS open-read-close's repeatedly (example 3)?
    What happens when a DS Write (or DS Read) is called without a corresponding DS Open and DS Close (examples 4a and 4b)? Does it implicitly do a DS open before doing the write operation and a DS close afterwards? What I'm getting at is this: would having an isolated DS Write (or DS Read) inside a loop, not connected to any DS Open or DS Close functions at all, cause this same memory leak?
    If one computer is running the DS server and a second computer is running the VI with the repeated open-write-close's, on which computer does the memory leak occur?
    In my question #1 workaround (example 2), the DS Open and DS Close outside the loop are routed through a shift register and in to and out of the DS Write inside the loop. If the DS connection id goes into the DS Write "connection in" and then splits and goes around the DS Write and out to the DS Close, without coming out of the DS Write "connection out" (example 5), will the memory leak still be avoided? I.e. if the DS Write function doesn't have anything connected to its "connection out", will it try to do an implicit DS Close?
    If the VI causing the memory leak is stopped, but LabVIEW stays running, will the leaked memory be reclaimed? What if the VI is closed? What if all of LabVIEW is closed?
    FYI, in the examples above "x1a" is a statically-defined DataSocket on the DS server running on the computer Max, to which the computer running the example VI's has read/write access. My actual application has numerous VI's and hundreds of DataSocket items, many of which are written to / read from every 50-100 ms in the style of examples 4a and 4b.
    Does anyone have any idea about this stuff?
    Thanks in advance,
    Patrick
    Attachments:
    examples_jpg1.zip ‏63 KB
    examples_vi1.zip ‏40 KB

    Hi Meghan,
    Yes, some of the larger VIs in my application do write to / read from several hundred DataSockets, so it's not feasible to use shift registers for each one individually, and hence why I'm passing the references into an array, etc.
    Your Alternate Solution 2 is more along the lines of something that would work for me. However, my actual code has a lot of nested loops, sequences and DataSocket items which are not all written to in the same frame, so this solution would still be difficult to implement: it would be cumbersome to unpack the entire 500-element reference id array and build a new one (maintaining the positions and values of the unaffected elements) every time I write to some small subset of the DataSockets.
    I think I have a solution which solves the problem and is also scalable to the size of my application -- I've attached it as Example 7. Do you think this will avoid the memory leak? It's the same as your Alternate Solution 2, except that instead of building a new array out of the DS Write reference outs, each reference out replaces the appropriate element of the original array.
    If I understand you correctly, in order to avoid implicit reference opens and closes, a DS Write needs to have both it's reference in and reference out wired to something. Thus, even though my Example 7 replaces an element of the array with an identical value, and therefore doesn't actually change the array (which would be a silly thing to do normally), the DS Writes have their reference outs wired to something, and eventually in a convoluted way to a DS Close, so it should avoid the memory leak.
    Just out of curiosity (I don't think anything like this would apply to my application or any fixes I implement), when would the implicit reference close happen in the attached Example 8? The DS Write has its reference in and reference out both connected to temporally "adjacent" DS Writes via the shift register, so perhaps it wouldn't try to close the reference on each loop iteration? Or would it look into the future and see that there is no DS Close and decide to implicitly do that itself? Or maybe only the DS Write on the last loop iteration does this?
    Thanks for bearing with me through this,
    Patrick
    Attachments:
    example73.JPG ‏40 KB
    example83.JPG ‏14 KB

  • Memory leak using xslprocessor.valueof in 11.1.0.6.0 - 64bit ??

    My company has made the decision to do all of our internal inter-system communication using XML. Often we may need to transfer thousands of records from one system to another and due to this (and the 32K limit in prior versions) we're implementing it in 11g. Currently we have Oracle 11g Enterprise Edition Release 11.1.0.6.0 on 64 bit Linux.
    This is a completely network/memory setup - the XML data comes in using UTL_HTTP and is stored in a CLOB in memory and then converted to a DOMDocument variable and finally the relevant data is extracted using xslprocessor.valueof calls.
    While this is working fine for smaller datasets, I've discovered that repeated calls with very large documents cause the xslprocessor to run out of memory with the following message:
    ERROR at line 1:
    ORA-04030: out of process memory when trying to allocate 21256 bytes
    (qmxdContextEnc,)
    ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 1010
    ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 1036
    ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 1044
    ORA-06512: at "SCOTT.UTL_INTERFACE_PKG", line 206
    ORA-06512: at line 28
    Elapsed: 00:03:32.45
    SQL>
    From further testing, it appears that the failure occurs after approximately 161,500 calls to xslprocessor.valueof however I'm sure this is dependent on the amount of server memory available (6 GB in my case).
    I expect that we will try and log a TAR on this, but my DBA is on vacation right now. Has anyone else tried calling the xslprocessor 200,000 times in a single session?
    I've tried to make my test code as simple as possible in order to track down the problem. This first block simply iterates through all of our offices asking for all of the employees at that office (there are 140 offices in the table).
    DECLARE
    CURSOR c_offices IS
    SELECT office_id
    FROM offices
    ORDER BY office_id;
    r_offices C_OFFICES%ROWTYPE;
    BEGIN
    OPEN c_offices;
    LOOP
    FETCH c_offices INTO r_offices;
    EXIT WHEN c_offices%NOTFOUND;
    utl_interface_pkg.get_employees(r_offices.office_id);
    END LOOP;
    CLOSE c_offices;
    END;
    Normally I'd be returning a collection of result data from this procedure, however I'm trying to make things as simple as possible and make sure I'm not causing the memory leak myself.
    Below is what makes the SOAP calls (using the widely circulated UTL_SOAP_API) to get our data and then extracts the relevant parts. Each office (call) should return between 200 and 1200 employee records.
    PROCEDURE get_employees (p_office_id IN VARCHAR2)
    l_request utl_soap_api.t_request;
    l_response utl_soap_api.t_response;
    l_data_clob CLOB;
    l_xml_namespace VARCHAR2(100) := 'xmlns="' || G_XMLNS_PREFIX || 'EMP.wsGetEmployees"';
    l_xml_doc xmldom.DOMDocument;
    l_node_list xmldom.DOMNodeList;
    l_node xmldom.DOMNode;
    parser xmlparser.Parser;
    l_emp_id NUMBER;
    l_emp_first_name VARCHAR2(100);
    l_emp_last_name VARCHAR2(100);
    BEGIN
    --Set our authentication information.
    utl_soap_api.set_proxy_authentication(p_username => G_AUTH_USER, p_password => G_AUTH_PASS);
    l_request := utl_soap_api.new_request(p_method => 'wsGetEmployees',
    p_namespace => l_xml_namespace);
    utl_soap_api.add_parameter(p_request => l_request,
    p_name => 'officeId',
    p_type => 'xsd:string',
    p_value => p_office_id);
    l_response := utl_soap_api.invoke(p_request => l_request,
    p_url => G_SOAP_URL,
    p_action => 'wsGetEmployees');
    dbms_lob.createtemporary(l_data_clob, cache=>FALSE);
    l_data_clob := utl_soap_api.get_return_clob_value(p_response => l_response,
    p_name => '*',
    p_namespace => l_xml_namespace);
    l_data_clob := DBMS_XMLGEN.CONVERT(l_data_clob, 1); --Storing in CLOB converted symbols (<">) into escaped values (&lt;, &qt;, &gt;).  We need to CONVERT them back.
    parser := xmlparser.newParser;
    xmlparser.parseClob(parser, l_data_clob);
    dbms_lob.freetemporary(l_data_clob);
    l_xml_doc := xmlparser.getDocument(parser);
    xmlparser.freeparser(parser);
    l_node_list := xslprocessor.selectNodes(xmldom.makeNode(l_xml_doc),'/employees/employee');
    FOR i_emp IN 0 .. (xmldom.getLength(l_node_list) - 1)
    LOOP
    l_node := xmldom.item(l_node_list, i_emp);
    l_emp_id := dbms_xslprocessor.valueOf(l_node, 'EMPLOYEEID');
    l_emp_first_name := dbms_xslprocessor.valueOf(l_node, 'FIRSTNAME');
    l_emp_last_name := dbms_xslprocessor.valueOf(l_node, 'LASTNAME');
    END LOOP;
    xmldom.freeDocument(l_xml_doc);
    END get_employees;
    All of this works just fine for smaller result sets, or fewer iterations (only the first two or three offices). Even up to the point of failure the data is being extracted correctly - it just eventually runs out of memory. Is there any way to free up the xslprocessor? I've even tried issuing DBMS_SESSION.FREE_UNUSED_USER_MEMORY but it makes no difference.

    Replying to both of you -
    Line 206 is the first call to xslprocessor.valueof:
    LINE TEXT
    206 l_emp_id := dbms_xslprocessor.valueOf(l_node, 'EMPLOYEEID');
    This is one function inside of a larger package (the UTL_INTERFACE_PKG). The package is just a grouping of these functions - one for each type of SOAP interface we're using. None of the others exhibited this problem, but then none of them return anywhere near this much data either.
    Here is the contents of V$TEMPORARY_LOBS immediately after the crash:
    SID CACHE_LOBS NOCACHE_LOBS ABSTRACT_LOBS
    132 0 0 0
    148 19 1 0
    SID 132 is a SYS session and SID 148 is mine.
    I've discovered with further testing that if I comment out all of the xslprocessor.valueof calls except for the first one the code will complete successfully. It executes the valueof call 99,463 times. If I then uncomment one of those additional calls, we double the number of executions to a theoretical 198,926 (which is greater than the 161,500 point where it usually crashes) and it runs out of memory again.

  • JBoss EAP 6 On JRockit - Memory Leak

    hello team.
    I have memory leak problem on jboss and jrockit.
    My Environment :
    1. OS :          
    CentOS release 6.4 (Final)
    2. JRockit :     
    java version "1.6.0_45"
         Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
         Oracle JRockit(R) (build R28.2.7-7-155314-1.6.0_45-20130329-0641-linux-x86_64, compiled mode)
    3. Application Server:
    JBoss EAP 6.2.0.GA
    4. Application
    Large EJB Application (100 and more EJB Beans (Stateless, Stateful,  MDB, Timers and so on)
    Everything works fine on older application server versions (4.3 , 4.2)
    But now I have Problem
    Of course I know that problem is new version - and i have discussion on JBoss forums.
    but guys I have question about jrockit with you:
    What is the option "Other" in memory ??
    [jboss@jboss-new bin]$ jrcmd 17114  print_memusage
    17114:
    Total mapped                       8457864KB           (reserved=2983100KB)
    -              Java heap              3145728KB           (reserved=0KB)
    -              GC tables            105232KB         
    -          Thread stacks       46412KB           (#threads=138)
    -          Compiled code       1048576KB           (used=12257KB)
    -               Internal                   1480KB         
    -                     OS       170324KB         
    -                  Other       3639056KB         
    -            Classblocks         10496KB           (malloced=9631KB #28393)
    -        Java class data       289536KB           (malloced=192391KB #133697 in 28393 classes)
    - Native memory tracking     1024KB           (malloced=294KB #10)
    [jboss@jboss-new bin]$
    This size increases every time - and took entire amount of RAM.
    Thank in Advance.
    Regards,
    Paata Lominadze

    Not sure what the 'other' is, but it is probably best shown by using an example. By using displayMap we can display a memory map of various JVM subsystems and libraries that are loaded, including third-party libraries.
    ./jrcmd 4523 print_memusage displayMap
    Total mapped                  3984796KB           (reserved=2978740KB)
    -              Java heap       524288KB           (reserved=0KB)
    -              GC tables        17548KB         
    -          Thread stacks        20276KB           (#threads=39)
    -          Compiled code      1048576KB           (used=14224KB)
    -               Internal         1672KB         
    -                     OS       146924KB         
    -                  Other      2092648KB         
    -            Classblocks         7424KB           (malloced=7381KB #20064)
    -        Java class data       124416KB           (malloced=124411KB #91048 in 20064 classes)
    - Native memory tracking         1024KB           (malloced=118KB #10)
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        OS                          *java    r x 0x0000000000400000.(     76KB)
        OS                          *java    rw  0x0000000000612000.(      4KB)
        OS                        *[heap]    rw  0x00000000007c1000.(    132KB)
       INT                           Poll    r   0x000000007fffe000 (      4KB)
       INT                         Membar    rw  0x000000007ffff000.(      4KB)
       MSP              Classblocks (1/2)    rw  0x00000000df8c0000 (   6912KB)
       MSP              Classblocks (2/2)    rw  0x00000000dff80000 (    512KB)
      HEAP                      Java heap    rw  0x00000000e0000000.( 524288KB)
        OS                    *ld-2.12.so    r x 0x0000003664400000.(    128KB)
        OS                    *ld-2.12.so    r   0x000000366461f000 (      4KB)
        OS                    *ld-2.12.so    rw  0x0000003664620000 (      4KB)
        OS                   **ld-2.12.so    rw  0x0000003664621000.(      4KB)
       OS           *gconv-modules.cache    r   0x00007f8f2e4a0000 (     28KB)
    THREAD                     Stack 4630    rwx 0x00007f8f2e4a7000 (      8KB)
    THREAD                     Stack 4630        0x00007f8f2e4a9000 (     12KB)
    THREAD                     Stack 4630    rwx 0x00007f8f2e4ac000 (    244KB)
       MSP         Java class data (5/37)    rw  0x00007f8f2e4e9000 (  14336KB)
       MSP         Java class data (9/37)    rw  0x00007f8f2fa40000 (   5888KB)
                                             rw  0x00007f8f30000000 (    188KB)
                                                 0x00007f8f3002f000 (  65348KB)
                                             rw  0x00007f8f34000000 (    132KB)
                                                 0x00007f8f34021000 (  65404KB)
                                             rw  0x00007f8f38000000 (    412KB)
                                                 0x00007f8f38067000.(  65124KB)
       MSP        Java class data (10/37)    rw  0x00007f8f3c034000 (  34048KB)
                                             rw  0x00007f8f3e174000 (   8200KB)
       MSP        Java class data (11/37)    rw  0x00007f8f3e976000 (    256KB)
        OS                     *libhpi.so    rw  0x00007f8fb37fc000 (      8KB)
        OS                    **libhpi.so    rw  0x00007f8fb37fe000 (      4KB)
      CODE                  Compiled code    rwx 0x00007f8fb37ff000 (     64KB)
      CODE                  Compiled code    rwx 0x00007f8fb380f000 (    128KB)
      CODE                  Compiled code    rwx 0x00007f8fb382f000 (     64KB)
      MSP        Java class data (37/37)    rw  0x00007f8ff83a1000 (    512KB)
        GC Modified Union Set (committed)    rw  0x00007f8ff8421000 (    132KB)
        GC                     Card table    rw  0x00007f8ff8442000 (   1024KB)
        GC        Object bits (committed)    rw  0x00007f8ff8542000 (   8196KB)
    Here
    - thread is thread related (such as thread stacks)
    - int, internal use (such as pointer pages)
    - heap, chunk used by JRockit for the Java heap
    - os, mapped directly from the operating system, such as third party DLLs or shared objects
    - msp, memory space. a memory space is a native heap with a specific purpose, for example native memory allocation inside the JVM
    - gc, garbage collection related, for example live bits
    - code, compiled code
    The 'other' memory space looks to me (from the blank entries in the above print-out) like they are a memory pages to are still not used. When the JVM starts it mappes an amount of memory. To my knowledge JRockit uses mmap (mmap(2) - Linux manual page), which creates a new mapping in the virtual address space. JRockit reserves an amount of memory (Java Heap (heap where your object instances go) + its own runtime (all the others)).
    To see where the growth is in the various memory spaces, you can use 'print_memusage baseline', after which you can execute print_memusage again, for example,
    ./jrcmd 4523 print_memusage scale=M
    4523:
    Total mapped                     3896MB      +4MB (reserved=2905MB -3MB)
    -              Java heap          512MB           (reserved=0MB)
    -              GC tables           17MB         
    -          Thread stacks           19MB           (#threads=39)
    -          Compiled code         1024MB           (used=14MB +1MB)
    -               Internal            1MB         
    -                     OS          143MB         
    -                  Other         2043MB         
    -            Classblocks            7MB           (malloced=7MB #20596 +532)
    -        Java class data          126MB      +4MB (malloced=125MB +4MB #93640 +2592 in 20596 classes)
    - Native memory tracking            1MB           (malloced=0MB #20 +10)
    Note the additional column that prints out the difference in memory usage in relation to the baseline. You can also monitor native allocations by using trace_alloc_sites, memory allocations can then be displayed with different levels of detail using the level argument.
    ./jrcmd 4523 print_memusage trace_alloc_sites=true
    4523:
    Total mapped                  3989660KB   +4864KB (reserved=2974732KB -4008KB)
    -              Java heap       524288KB           (reserved=0KB)
    -              GC tables        17548KB         
    -          Thread stacks        20276KB           (#threads=39)
    -          Compiled code      1048576KB           (used=15265KB +1040KB)
    -               Internal         1672KB         
    -                     OS       146924KB         
    -                  Other      2092648KB         
    -            Classblocks         7680KB    +256KB (malloced=7669KB +287KB #20596 +532)
    -        Java class data       129024KB   +4608KB (malloced=128967KB +4555KB #93640 +2592 in 20596 classes)
    - Native memory tracking         1024KB           (malloced=236KB +118KB #20 +10)
    ./jrcmd 4523 print_memusage level=3
    4523:
    Total mapped                  3989660KB   +4864KB (reserved=2974732KB -4008KB)
    -              Java heap       524288KB           (reserved=0KB)
    -              GC tables        17548KB         
    -          Thread stacks        20276KB           (#threads=39)
    -          Compiled code      1048576KB           (used=15265KB +1040KB)
    -               Internal         1672KB         
    -                     OS       146924KB         
    -                  Other      2092648KB         
    -            Classblocks         7680KB    +256KB (malloced=2KB -7379KB #4 -20060) Not fully traced
    -        Java class data       129024KB   +4608KB (malloced=26KB -124385KB #16 -91032 in 20596 classes) Not fully traced.
    - Native memory tracking         1024KB           (malloced=118KB #10) Not fully traced.
         gather_memorymap_database                     memtrace.c: 206         91KB     +91KB (#1 +1)
               gather_memory_usage                  osal_mspace.c:5142          7KB      +7KB (#4 +4)
      msGatherMSpacesUsageDatabase                  osal_mspace.c:6128          2KB      +2KB (#1 +1)
      msGatherMSpacesUsageDatabase                  osal_mspace.c:6134         16KB     +16KB (#1 +1)
    Note this is more on the JVM level, in your case in might be beneficial to investigate what is happening on the java heap. By using print_object_summary you can get insight how memory on the heap is used on a per-class basis. To get to the bottom of where the memory leak is you can use the memory-leak-detector (an example of its use can be found here Middleware Snippets: Fast, Faster, JRockit). You can also obtain a heapdump that can be analyzed by using for example MAT (see for an example here Middleware Snippets: Visualizing Class Loading). To obtain a heapdump you can run the command, for example,
    [weblogic@machine1 bin]$ ./jrcmd 4523 runsystemgc full=true fullcompact=true
    4523:
    [weblogic@machine1 bin]$ ./jrcmd 4523 hprofdump filename=/home/weblogic/dump.hprof
    4523:
    Wrote dump to /home/weblogic/dump.hprof
    Note that this first issues a full GC by using the runsystemgc command.

  • Memory leak in Application

    Hi,
    we're load testing an application using Coherence. It uses a distributed cache, with an web application as the client, and separate cache servers implementing a Cache Store.
    We're getting several memory leaks and one area that was reported was a great number of instances for the com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$GetRequest class.
    Does anybody know what could cause these instances to be left hanging around? I think the Coherence classes ar a symptom of another problem rather than an issue with Coherence itself but it would be useful to know what could cause these objects to be left in the heap.
    Thanks
    Mike

    After further load testing, our application definitely seems to be leaking Coherence objects.
    The classes seem to be com.tangosol.util.Binary &
    com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$GetRequest.
    During testing, the number of Binary objects rose 0 to about 9000 and the number of GetRequest objects rose from 0 to about 3600 in two hours.
    The application stores objects in the cache and updates them, the main operation being to add to a very long log string required by the client to these objects, which represent sessions.
    Our test keeps a constant number of these objects in the cache during the run, removing the same number it creates after it has ramped up to full load testing.
    The application is stateless, it recieves frequent requests to get an object from the cache, work on it and put it back in the cache. The cache also has a cache store to persist the data to a database.
    Are there any references to the cache objects that would stop them being garbage collected?
    Our whole application is based in a simple stateless reqest/response operation and I cannot see where the huge number of objects is coming from.
    Mike

  • Memory Leak In DataService

    Hi All,
          I had posted this query to couple of other groups ..I am still struglling with this issue..Hope someone  will  help me out here
          I have  very basic application which uses  DataSerives over RTMP channel  to populate dataGrid , I have not used any  user defined component.
    This application has got LOAD data and Remove data  Button just to simulate the actual application
    What happens , when I click on LOAD data , It  loads the data from server(JBOSS) then I Remove all the data and force the GC to run
    If I continuously keep loading and removing the  data ,  memory goes up every time and after some times It reaches to threshold and  finally crashes the Browser.
    In actual application as soon as user logs in a dedicated DS destination is created..
        private function createDestination(destName:String):void{
                 var remoteService:RemoteObject = new RemoteObject("DestinationManager");
                 remoteService.addEventListener(ResultEvent.RESULT, resultHandler,false,0,true);
                 var operation:AbstractOperation = remoteService.getOperation("createDestination");
                 operation.send(destName);
                 var cs:ChannelSet = new ChannelSet();
                 var rtmpChannel:RTMPChannel = ServerConfig.getChannel("my-rtmp") as  RTMPChannel;
                 cs.addChannel(rtmpChannel);
                 tradeService = new DataService() ;
                 tradeService.destination=destName;
                 tradeService.channelSet = cs;  
    Now when user hits on Load data button to load the trade data ...
       public function loadData():void
             var remoteService:RemoteObject  = new RemoteObject("filterRemoteVO");
             var operation:AbstractOperation = remoteService.getOperation("loadData");
             tradeService.fill(tradeCollection);
             operation.send(rowData.text ,GUIID);
             tradeList.dataProvider = tradeCollection;
    Remove Data  hit I clean all the resource and released collection :-
          public  function  removeAll():void{
             if(tradeList.dataProvider){
                  tradeCollection.source = new Array();
                  tradeList.dataProvider.source = new Array();
                  tradeList.dataProvider = null;
                tradeService.release();
               tradeService.releaseCollection(tradeCollection);
              tradeService.channelSet.disconnectAll();
              tradeService.disconnect();
               tradeService.logout();
               System.gc();
    Except these 3 function I don't have any code which could cause memory leak.
    I m using
    LCDS 2.5
    Flex 3.0
    JBoss4.2
    Please see the mxml file below   , If  possible please have a look at it , I might  not be using dataSerice API correctly.
    I have been trying to solve this leak for last two week , I really need help from you guys.
    My client has already evaluating other contemporary technology because of this memory issue.
    I have also created scalled down war file which can be deployed on any  java application server.
    Any help will greatly be appreciated
    Regards,
    Dam
    ######################## MXML##########################
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
          creationComplete="init();" height="100%" width="100%"
         >
         <mx:Script >
         <![CDATA[
             import mx.containers.GridRow;
               import mx.utils.Base64Decoder;
             import mx.utils.StringUtil;
                import mx.events.CollectionEvent;
             import mx.formatters.Formatter;
             import mx.events.ResizeEvent;
             import mx.controls.DataGrid;
             import mx.effects.Fade;
             import mx.events.DataGridEvent;
             import mx.utils.ObjectUtil;
             import mx.events.ScrollEvent;
           import mx.formatters.DateFormatter;
           import mx.events.ListEvent;
           import mx.data.mxml.DataService;
           import mx.messaging.config.ServerConfig;
           import mx.messaging.channels.RTMPChannel;
           import mx.messaging.ChannelSet;
           import mx.rpc.AbstractOperation;
           import mx.rpc.remoting.RemoteObject;
           import mx.collections.ArrayCollection;
           import mx.controls.Alert;
           import mx.rpc.events.ResultEvent;
           import mx.messaging.messages.*;
           import mx.messaging.events.*;
           import mx.controls.Alert;
            private var GUIID:String;
            private var lastRollOverIndex:Number;
            public var tradeService:DataService=null;
            public var tradeCollection:ArrayCollection = new ArrayCollection();
           public var flag:Boolean = false;
            private function init():void {
               var guiId:String ="TEST";
                createDestination(GUIID);
            public function getData():void{
                 // memory.text =""+ ((System.totalMemory / 1024)/1024);
            public function releaseDataServices():void {
               //  tradeService.fill(null);
                    tradeService.release();
                   // tradeService.releaseCollection(tradeCollection);
                   tradeService.channelSet.disconnectAll();
                    tradeService.disconnect();
                    tradeService.logout();
                    //tradeService.dataStore = null;
                    /*Function for creating destination*/
              private function createDestination(destName:String):void{
                 var remoteService:RemoteObject = new RemoteObject("DestinationManager");
                 remoteService.addEventListener(ResultEvent.RESULT, resultHandler,false,0,true);
                 var operation:AbstractOperation = remoteService.getOperation("createDestination");
                 operation.send(destName);
                 var cs:ChannelSet = new ChannelSet();
                 var rtmpChannel:RTMPChannel = ServerConfig.getChannel("my-rtmp") as RTMPChannel;
                 cs.addChannel(rtmpChannel);
                 tradeService = new DataService() ;
                 tradeService.destination=destName;
                 tradeService.channelSet = cs;  
             //This function calls dataservice fill method depending on wheather destination is created or not
            private function resultHandler(event:ResultEvent):void{
               //call data service as destination is created successfully
                var status:Boolean = event.result as Boolean
               // Alert.show("status="+status);
                if(status){
                 getData();
               else{
                   //TODO report error to MATS app  
          public  function  removeAll():void{
             if(tradeList.dataProvider){
                  tradeCollection.source = new Array();
                  tradeList.dataProvider.source = new Array();
                  tradeList.dataProvider = null;
                tradeService.release();
               // tradeService.releaseCollection(tradeCollection);
              tradeService.channelSet.disconnectAll();
              tradeService.disconnect();
               tradeService.logout();
               System.gc();
           public function loadData():void
             var remoteService:RemoteObject  = new RemoteObject("filterRemoteVO");
             var operation:AbstractOperation = remoteService.getOperation("loadData");
             tradeService.fill(tradeCollection);
             operation.send(rowData.text ,GUIID);
             tradeList.dataProvider = tradeCollection;
       ]]>
    </mx:Script>
          <mx:DataGrid   id="tradeList"
                 initialize="tradeList.dataProvider = tradeCollection" horizontalScrollPolicy="auto"
                   height="659" x="0" y="84">
                <mx:columns>
                     <mx:DataGridColumn  headerText="Security Description" dataField="securityDesc"
                      />
                     <mx:DataGridColumn  headerText="B/S" dataField="transactionType"
                     />
                     <mx:DataGridColumn  headerText="Amount" dataField="amount"
                     />
                     <mx:DataGridColumn  headerText="Price Text" dataField="priceText"
                     />
                     <mx:DataGridColumn  headerText="Counterparty" dataField="counterParty"
                     />
                     <mx:DataGridColumn  headerText="Trade Date" dataField="tradeDate"
                     />
                     <mx:DataGridColumn  headerText="Settle Date" dataField="settleDate"
                     />
                     <mx:DataGridColumn  headerText="Trade Status" dataField="tradeStatusId"
                     />
                     <mx:DataGridColumn  headerText="Trader" dataField="trader"
                     />
                     <mx:DataGridColumn  headerText="Salesperson" dataField="salesperson"
                     />
                     <mx:DataGridColumn  headerText="Ticket Number" dataField="tradeNumber"
                     />
                     <mx:DataGridColumn  headerText="Entry Date" dataField="tradeTime"
                     />
                     <mx:DataGridColumn  headerText="Cancel Date" dataField="cancelDate"
                     />
                     <mx:DataGridColumn  headerText="Cancel Time" dataField="cancelTime"
                     />
                 </mx:columns>
              </mx:DataGrid >
             <mx:Grid x="149" y="23" width="995">
                     <mx:GridRow width="100%" height="100%">
                                <mx:GridItem width="100%" height="100%">
                                     <mx:Label text="Enter No of obejcts"   width="111"/>
                             </mx:GridItem>
                             <mx:GridItem width="100%" height="100%">
                                     <mx:TextInput name="row" id="rowData"   width="97"/>
                             </mx:GridItem>
                             <mx:GridItem width="100%" height="100%">
                                     <mx:Button  label="Load Data" click='loadData()'/>
                             </mx:GridItem>
                             <mx:GridItem width="100%" height="100%">
                                     <mx:Button  label="removeAll" click='removeAll()'/>
                             </mx:GridItem>
                             <mx:GridItem width="100%" height="100%">
                                     <mx:Label text="Total Memory"/>
                             </mx:GridItem>
                             <mx:GridItem width="100%" height="100%">
                                     <mx:TextInput text="Total Memory" id="memory"   width="97"/>
                             </mx:GridItem>
                             <mx:GridItem width="100%" height="100%">
                                     <mx:Label text="Grid Row Count"/>
                             </mx:GridItem>
                             <mx:GridItem width="100%" height="100%">
                                     <mx:TextInput name="GridRowCountN" id="GridRowCount"   width="97"/>
                             </mx:GridItem>
                     </mx:GridRow>
             </mx:Grid>
    </mx:Application>

    Hi Natasha,
    Sorry for late reply.
          I tried your suggestion but It did not help to release memory. Actully,this app contains only one event handler which is for remote method call , I dont think this could cause any memory leak.
    Profiling session reveals that It is the issue of DataService class.I dont know How do I convince  Adobe to investigate this issue.
    Regards,
    Dharmendra

Maybe you are looking for

  • New tab for Contract for data about products and product sales.

    Looking for ideas to implement a new tab on the Contract (RECN) We have some basic data about products and product sales that we want to have implemented on a screen tab for a contract.  The user needs to be able to enter information about a product,

  • Enhancements made in EP6 SP2 patches 28 & 29.

    What are the enhancements made in EP6 SP2 patches 28 & 29. What I mean to say is that what are the new features added in Patches 28 & 29. here I exclude Bug fixes. I can go to the central note for patch 28 : 793582 and can get a list of notes which i

  • Bootcamp and Time Machine

    I just got a new mac about a week ago, and I was sad to learn that I couldn't play pc games on it without Bootcamp. I started to use this utility, but then I noticed that it said to back up my files on my mac. First of all, is this even necessary (I

  • Runtime Error 217 after GroupWise closes (C# C3PO)

    Hello, I made a C3PO with C#, everything works fine until i close the GroupWise Client (8.0.2, Win 7 , 32 Bit). 2 seconds after closing, I get a GroupWise-MessageBox: 'Runtime Error 217'. The Windows Event Log says the error occured in the Kernelbase

  • IPad calendar on Google calendar?

    Hello - How can I view my iPad calendar on my Google calendar? When I update my calendar on my iPad, I can see them on my phone/desktop but not the other way around... Thanks in advance for the help!