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.

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/

  • External Function memory leak

    The ExternalFunction.java sample code distributed with v.2.5.16 has a memory leak.
    You can see this by changing the loop to iterate a million times; eventually it runs out of memory and crashes.
    (I used jdk 1.7 u2 on Windows 7.)
    I tried adding explicit calls to delete() for every created Java object in the example, none of which helped.
    As far as I can tell, it is simply not possible to use external functions from Java without leaking memory.
    Any thoughts on this?

    thanks Silviu
    i create two bugs
    https://bugbase.adobe.com/index.cfm?event=bug&id=3341143
    https://bugbase.adobe.com/index.cfm?event=bug&id=3341146

  • External dll call memory leak

    Hi,
    My VI calls a function in a dll in a loop for a long period of time.
    I've noticed that after couple of hours it starts loosing memory.
    It seems like the LabViews consumption of memory stays constant but the System looses memory.
    I've checked the dll in .Net application and I'm sure that there is no such a problem there.
    This is how my VI is organized:

    I don't see anything either. But can you maybe post how the dll function is declared in it's header file (with all the macro definitions if any are used in the function prototype) as well as a screenshot of the NI prototype found in the "Call library function" node.
    Can you also clarify if the RAM usage is again decreased once the application ends or if it stays at the increased level. In one case it's a memory leak while in the other case it might simply be that LabVIEW needs a lot of RAM to do whatever calculations you do with the data (although 1GB does seem like a lot).
    Matt

  • 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 in communication of Acrobat-Flash and JS

    Hi
    The situation is as follows:
    I have a Flash-SWF (in which I have programmed a GUI)
    I have a 3D-Annotation containing an annotation-script with some functions that can be called from the GUI.
    So far so good.
    The SWF is added as overlay to a 3D-Annotation. The SWF contains some AS3-Functions, among them an enterframe-event, that keeps repeating an external-interface call to a function in the 3D Annotation-script. It works so far.
    When I tested for performance however I noticed that there is a memory-leak under these conditions. I tested my setup, and noticed the memory-useage increase by about 1 MB every 3 seconds. To further test this I stripped about everything from both the swfs Actionscript  and the annotation-JavaScript. Still the memory-useage of process "acrobat.exe*32" gradually climbs by 7-10 MB per minute. The memory-useage of "A3DUtility.exe" remains constant. Deactivating the annotation will decrease the memory-useage by a certain amount (though not to the initial value upon opening the file and starting the annotation) , but upon re-activating it immediately jumps back to the value assumed last before deactivating it. From that last value the increase starts again as well. I could observe this behaviour both in Acrobat 9 Pro Extended, Acrobat X and ReaderX.
    It seems something is wrong with the ExternalInterface-Object.

    OK, I'll do that.
    By the way, imho it's not that minor. ~1mb in two seconds sums up to ~30mb/minute, i.e. 2gb/hour. So if you leave your PDF open for some 15 minutes that's 500mb ram down the drain. Considering the file started at merely 30mb that's quite massive.

  • Apparent "Memory Leak"

    I can't keep Skype loaded without crashing Windows because all memory gets used.
    Memory usage starts at about 2.6 GB RAM when I load Skype.
    Then climbs to consume all memory (4 GB ) within 60-90 minutes - even when not on a call.  Issue stops when I exit Skype.
    This started when I switched to new microphone (Condenser mic via external DAC - Tascam US-800 using ASIO drivers)  Works fantastic (sounds much better than old, cheap mic) until memory is used up and Windows crashes.
    No problem seen when using mic with Digital Audio Workstation software packages (Reaper, FL-Studio, etc)
    Any ideas/suggestions I can try so I can make this great setup useable with Skype for more than just a brief period?
    Thank you!
    Skype version 5.5.0.124
    Windows 7 (64-bit)
    4 GB RAM
    USB interface to Tascam US-800 (supporting XLR input for condenser microphone)
    Tascam Driver ver 1.0.16.0

    Actually, the problem isn't Skype; it's the TASCAM drivers.
    I also own the US-800 and there is a serious memory leak whenever it's in use.  I have the same problem on multiple computers with various audio software.

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

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

  • Memory leak in FormatUtils.formatTimeStatus()

    hello smp developers,
    i find memory leak in
    FormatUtils.formatTimeStatus()
    after every call, in memory stay 4 String, 1 Object, 1 Function and 1 Vector.<String>
    after recreate local function to external, memory leak gone
    and maybe performance issue in ScrubBar.as, for scrubBarLiveOnlyTrack and scrubBarLiveOnlyInactiveTrack
    every frame it create 50 BitmapData and 50 Rectangle, even if live track not showing
    after change it on "new Sprite()" in configure function, create 50 BitmapData and 50 Rectangle gone
    all found in last version of smp
    ps bugbase not working anymore http://bugs.adobe.com/jira/browse/ST? I get "PERMISSION VIOLATION"
    thx,
    mike

    thanks Silviu
    i create two bugs
    https://bugbase.adobe.com/index.cfm?event=bug&id=3341143
    https://bugbase.adobe.com/index.cfm?event=bug&id=3341146

  • Memory leak in c++ application

    This one line of code is creating a memory leak in my application and I'm not sure what to do after this statement to prevent this from happening.
    Here's the line of code:
    oracle::occi::PObject * pObject = m_statement->getObject( 3 );

    This forum is for general programming questions, and for questions about Studio.
    Questions specifically about OCCI are more likely to get a helpful answer in the OCCI forum:
    C++ Call Interface (OCCI)
    (You can find this and other data-base related forums at forums.oracle.com, then expand the Oracle Database item, then click "more".)

  • Memory leak in OCI while using AQ

    There seems to be a serious memory leak in the OCI driver (9.2.0.1) when using a JAVA client to dequeue a database queue (Advanced Queuing).
    Continuous dequeuing causes the heap memory to increase, and this memory never gets freed which leads me to suspect a memory leak in the OCI components (as the memory allocated for the JVM is constant). The heap memory increases by 3-4 MB after a dequeue of 1000 RAW messages,
    Has anyone come across this problem before and if so are there any solutions? Changing to a thin driver is not a solution for me due to other requirements.
    I'm using using Oracle client v9.2.0.1 libraries running on Solaris 8.
    The source code for my JAVA test client is as below:
    /* JAVA dequeue */
    package com.ubsw.risk.pce.eventqueues.test;
    import oracle.AQ.*;
    import java.sql.*;
    import oracle.jdbc.*;
    public class testRawDequeue {
    public testRawDequeue() {
    public static void main(String[] args) {
    Connection conn = null;
    AQSession aq_sess = null;
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    //Use OCI connection
    conn = DriverManager.getConnection("jdbc:oracle:oci:@DB_NAME.world","user","password");
    conn.setAutoCommit(false);
    Class.forName("oracle.AQ.AQOracleDriver");
    while(true) {
    aq_sess = AQDriverManager.createAQSession(conn);
    runTest(aq_sess);
    aq_sess.close();
    aq_sess = null;
    System.gc();
    } catch (Exception e) {
    e.printStackTrace();
    System.out.println(e.toString());
    try {
    if (aq_sess != null) {
    aq_sess.close();
    if (conn != null) {
    conn.close();
    } catch (SQLException sqle) {
    public static void runTest(AQSession aq_sess) throws AQException, SQLException
    AQQueueTable q_table;
    AQQueue queue;
    AQMessage message;
    AQRawPayload raw_payload;
    AQEnqueueOption enq_option;
    String test_data = "new message";
    AQDequeueOption deq_option;
    byte[] b_array;
    /* Get a handle to a queue - in aquser schema: */
    queue = aq_sess.getQueue ("user", "raw_msg_queue");
    System.out.println("Successful getQueue");
    /* Creating a AQDequeueOption object with default options: */
    deq_option = new AQDequeueOption();
    /* Dequeue a message: */
    message = queue.dequeue(deq_option);
    System.out.println("Successful dequeue");
    /* Retrieve raw data from the message: */
    raw_payload = message.getRawPayload();
    b_array = raw_payload.getBytes();
    System.out.println("bytes:" + b_array.toString());
    queue.close();
    ((AQOracleSession)aq_sess).getDBConnection().commit();

    This sounds very similar to the memory leak I have in Oracle 9i using Pro*C++. Everytime a connect is made memory appears to leak and it only happens in multithreaded mode not default mode. There is a thread about this under the Oracle C++ call interface. Under 9i it appears to leak about 60K per connect rather than 60 bytes.
    Paul

  • What is the best way to deal with memory leak issue in sql server 2008 R2

    What is the best way to deal with memory leak issue in sql server 2008 R2.

    What is the best way to deal with memory leak issue in sql server 2008 R2.
    I have heard of memory leak in OS that too because of some external application or rouge drivers SQL server 2008 R2 if patched to latest SP and CU ( may be if required) does not leaks memory.
    Are you in opinion that since SQL is taking lot of memory and then not releasing it is a memory leak.If so this is not a memory leak but default behavior .You need to set proper value for max server memory in sp_configure to limit buffer pool usage.However
    sql can take more memory from outside buffer pool if linked server ,CLR,extended stored procs XML are heavily utilized
    Any specific issue you are facing
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Memory Leak in Crystal Report XI

    We are using Crystal Reports XI Licensed Developer version for web based application. The generated reports are getting accessed by multiple users from web interface. After continuos access of reports, at some point it reaches the maximum limit of Application pool and it stops the application.
    From number of web forms, we found that crystal reports are not releasing systems memory and it keeps adding extra load on memory after a single report generation or there is memory leak. Below are the code snippets to initialize and dispose of report object.
    a. Initializing a new report obj
    protected ReportDocument _selectedRpt = new ReportDocument();
    b. Disposing obj in page_unload event
    /// <summary>
    /// Page_Unload Event handler.
    /// </summary>
    /// <param name="sender">Sending control or event.</param>
    /// <param name="e">Generic event arguments.</param>
    protected void Page_Unload(object sender, EventArgs e)
         _selectedRpt.Close();
         _selectedRpt.Dispose();
    Temporary Solution:  For its temporary resolution, we are recycling application pool twice a day for smooth processing of reports, but recycling also destroying application session.
    Please suggest a solution, which can help to run crystal reports correctly without any memory leak.

    Helena, CR XI R2 is not supported in .NET 2008. See [this|https://wiki.sdn.sap.com/wiki/display/BOBJ/WhichCrystalReportsassemblyversionsaresupportedinwhichversionsofVisualStudio+.NET] wiki for more details.
    Re. your unanswered post. Can you provide a link? I search for unanswered posts, but do not see one from you.
    Remember that this is a community forum only, not support as such. If this is an important issue and you wish to discuss it with technical support, you can create a phone case here:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300
    Ludek

  • Memory Leak with Oracle ODBC Driver for Long Raw columns

    Oracle version : 8.1.7
    Platform : Win2K
    Oracle ODBC Driver version : 8.0.1.7.5.0.0
    Hi,
    I've got an Oracle database upgraded from
    V8.0.5 to V8.1.7 which has a table having one long raw +
    normal columns. I was able to observe distinct memory
    leaks (approx 80K) when using ODBC interface calls (thro C++ code) that referenced a combination of normal & long raw columns in a select statement. However, this leak was not observed when only normal columns were present in the
    select statement. Is there any known restriction for using
    long raw columns with other columns? Or do long raw columns have a known memory leak problem thro ODBC?
    Thanks!
    Regards
    Sanchayan

    Did you ever get an answer on this issue?
    Thanks in advance

Maybe you are looking for