COM+ and OLEDB - memory leak in OCI dlls

Hi forum,
I've a COM+ DLL written in C++ which uses OLEDB(Oracle 8.1.7 provider) to reach to the 8i database. I've observed that after some 1000 database activities the DLLhost.exe hogs on memory to the tune of 50MB and never releases the same. I also saw the same behavior with a Win32 console application. For some reason the Uninitialize of the IDBIntialize does not seem to reduce the memory. I also ran bounce checker on my code. And its pointing to the OCI dlls for a memory leak of 18K per each database activity.
I downloaded the OLEDB sample code(VCOLEMRecordsSample) from the OTN site:-
http://otn.oracle.com/sample_code/tech/windows/ole_db/oledb8/index.html
This also seems to hold on to memory after successive run of SQL queries.
Is there anything that I am missing. I am curious about the fact that it happens with the sample app hosted on the OTN site. Do I need some OCI patches to be applied to the client? In fact, applied couple of them, but does not help.
Appreciate any pointers!

I am using 8.1.7.3.2. In fact I applied this patch recently.
Also today I detected a memory leak in my code.
After GetColumnsInfo() call I was not releasing the last param(ppStringsBuffer).
This seems to have fixed the problem. I tried running the win32 console app for 5,000 runs(each run has 2 SQL queries and 1 stored proc). The peak mem usage stays stable around 26MB and the mem usage varies from 8MB to 26MB. I guess this is fine, any info?

Similar Messages

  • 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

  • Memory Leaks in CRPE32.dll of Crystal report 8.5

    Post Author: Pugalendran P
    CA Forum: Crystal Reports
    Hi,
    On calling the PEOpenPrintEngine() API function of the Crystal report 8.5, the CRPE32.dll leaks memory of 2-3 kb. After printing 10000 reports approximately on a Server, the memory of the server was fully consumed and throws an exception stating "Unable to get current formula '' contents, Not enough memory for operation.".
    There are also other errors stating like "not enough memory for operation".
    Is there any resolution / hotfix / patch available to resolve this problem?
    If resolution / hotfix / patch is not available in Crystal report 8.5, will upgrading to Crystal Reports XI resolve this problem?
    Thanks in Advance,

    Hi all, Memory leaks are not usually an issue with CR and any that were reported have been plugged in 8.5. Most, using third party tools, are linked to some core MS dll's, printer drivers etc.
    And more commonly due to not releasing the report object, database connections, Printer DEVMODE's structure and other memory allocations you may have created in your application and not cleaned up when the report object is closed and disposed of.
    As for the life cycle this has been posted on our support site for quite a few years now, with the new Support site this link is not currently available but Google does have a cached copy of this from this link:
    http://209.85.173.104/search?q=cache:DkU35JxW5HsJ:support.businessobjects.com/programs_and_lifecycle/lifecycle/product_eol_dates.aspbusinessobjectslifecycle;hl=en&ct=clnk&cd=2&gl=ca
    Thank you
    Don

  • Memory leak in OCI Direct Path sample program in threaded mode

    I have a slightly (okay, more than slightly) modified version of the sample program cdemodp.c, which uses OCI to do a Direct Path load. Since my eventual aim is to make a C++ module that loads a table from a file as part of a multithreaded program, I made the necessary changes so that cdemodp.c would compile with g++ (v3.3.1, on Solaris 2.8), and I put in the following in place of the OCIInitialize() and OCIEnvCreate() calls (since the docs say those are deprecated):
    OCI_CHECK(0, 0, ociret, ctlp, OCIEnvCreate(&ctlp->envhp_ctl, OCI_THREADED, (void *) 0, 0, 0, 0, (size_t) 0, (void **) 0));
    When I compile and run this version of the program using Purify, I get a 60-byte memory leak inside the OCI code (meaning I can't see the source-code line that is causing the leak). I am pretty sure it's not anything in my code (i.e., me failing to free all handles or something) because when I change the above line so that the mode parameter is OCI_DEFAULT and recompile, there is no memory leak. Since this will be part of a threaded application that is always running, it is critical to make sure there are no leaks.
    Purify says that the leaked memory was allocated from:
    malloc [rtlib.o]
    calloc [rtlib.o]
    nlepeinit [nlepe.c]
    nlstdggo [nlstdgo.c]
    nlstdgg [nlstdgo.c]
    nigini1 [nigini.c]
    I am using Oracle 10g (client version 10.1.0).
    Anyone else had this happen?
    Thanks,
    --Tina Mancuso                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    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

  • GIFImageReader and JPEGImageReader memory leak

    We are calling GIFImageReader and JPEGImageReader a lot but find that they have have memory leaks. When repeatedly reading images using the GIFImageReader and JPEGImageReader classes in the com.sun.imageio.plugins.jpeg package, some memory is never reclaimed. These classes use native code, and we believe this is where the leaks are. Indeed, by monitoring the Java heap size, we see that it is always returning to its initial level after the images have been read. However, the virtual memory size in the OS (Windows in our case) continues to grow, and never decreases.
    We are cleaning up as much as we can after we are finished with the images. We are calling flush() on the images. We are also calling reset() and dispose() on the image readers. This should minimize the amount of work done in the reader's finalize() method, so we do not believe that this is related to Sun bug 4827358.
    We have also tried using the plug-in reader classes from JAI. If anything, these classes leak more.
    Any help would be much appreciated.

    Yeh, I've noticed this too, Reloading into the same buffered image, only 1 Pic at a time,
    Sometimes after 20 -30 images, i'm Out of Memory ( Win98 ), . It doesn't seem to happen with large
    .TIF files, . if there is some workaround understandable by a mere hobbyist, I'd also like to hear.

  • JRC and JSP memory leak...

    Hi, I have an web application with Crystal Reports integrated via the JRC. However, I have a memory leak within the application. I have narrowed it down to the JSP which uses JRC code. The NetBeans profiler shows a memory leak, it appears to be a leak with the JRC code with the class (com.crystaldecisions.reports.exporters.format.page.pdf.pdflif.f). I have try changing the <timeout> tag in CRConfig and using .dispose() and .close(), all to no avail. This error may jepordize our latest production release... Please, help...

    Best to download 2.0 and install all patches and test again. If not resolved then post your issue with details and code samples.

  • 1.6.0_10 and 11, Memory leak returning variables from Java to JavaScript

    Environment: Windows XP SP2, IE7, JScript 5.7, JRE 1.6.0_11-b03 and 1.6.0_10
    Memory allocated in Java and returned as a JavaScript variable value is not garbage collected in Java when the JavaScript variable is re-used.
    In the following simplified example, a populated HashMap is returned from the applet test1 method to the JavaScript variable hash1.
    The JavaScript variable hash1 is re-used on the next iteration so I would expect it should be marked for garbage collection.
    In 1.6.0_7 and previous releases, the memory associated with this Java HashMap is freed implicitly.
    In 1.6.0_10 and 1.6.0_11 the HashMap memory is never freed.
    Is this is what we should expect, a feature of the significant LiveConnect changes that were part of 1.6.0_10?
    Do we need to rewrite our code to call new Java methods from JavaScript explicitly freeing the memory, in this example calling the freeMem method?
    Has anybody else experienced this problem since 1.6.0_10?
    Thanks
    Rob
    Example code ...
    TestRLApplet.java
    import java.applet.Applet;
    import java.util.HashMap;
    public class TestRLApplet extends Applet
    private HashMap hash1;
    public TestRLApplet()
    public void init()
    public HashMap test1()
    hash1 = new HashMap();
    for (int i = 0; i <10; i++) {
    hash1.put(Integer.toString(i),Integer.toString(i));
    return (hash1);
    public void freeMem() {
    hash1.clear();
    hash1 = null;
    TestClient.htm
    <HEAD>
    <TITLE></TITLE>
    <SCRIPT LANGUAGE="javascript">
    function window_onload()
    var hash1;
    testAppplet = document.TestRLApplet;
    for (cnt=0; cnt < 1000; cnt++)
    hash1= testAppplet.test1();
    </SCRIPT>
    </HEAD>
    <object
    classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    WIDTH = 1 HEIGHT = 1 NAME = "TestRLApplet" >
    <PARAM NAME = CODE VALUE = "TestRLApplet.class" >
    <PARAM NAME = ARCHIVE VALUE = "../applets/TestRLApplet.jar" >
    <PARAM NAME = NAME VALUE = "TestRLApplet" >
    <PARAM NAME = MAYSCRIPT VALUE = true >
    <param name = "type" value = "application/x-java-applet;version=1.6">
    <param name = "scriptable" value = "false">
    </object>
    <BODY LANGUAGE=javascript onload="return window_onload()" leftMargin=40 id=body >
    </BODY>
    </HTML>
    Java Console
    Java Plug-in 1.6.0_10
    Using JRE version 1.6.0_10 Java HotSpot(TM) Client VM
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    Memory: 5,056K Free: 2,551K (50%) ... completed.
    Memory: 7,996K Free: 3,499K (43%) ... completed.
    Memory: 7,996K Free: 1,038K (12%) ... completed.
    Memory: 13,180K Free: 3,745K (28%) ... completed.
    Memory: 22,844K Free: 5,614K (24%) ... completed.
    Memory: 37,984K Free: 15,009K (39%) ... completed.
    Memory: 37,984K Free: 13,069K (34%) ... completed.
    Memory: 37,984K Free: 6,125K (16%) ... completed.
    Memory: 65,088K Free: 25,107K (38%) ... completed.
    Memory: 65,088K Free: 21,201K (32%) ... completed.
    Memory: 65,088K Free: 13,381K (20%) ... completed.
    Memory: 65,088K Free: 7,967K (12%) ... completed.
    Memory: 65,088K Free: 5,013K (7%) ... completed.
    Memory: 65,088K Free: 414K (0%) ... completed.

    What are you missing?
    I inherited this app and signing the third party jars is how it was setup, I was wondering the same thing too, why was it necessary to sign the third party jars?
    The applet runs in either JRE 1.6.0_13 or JRE 1.6.0_27 depending on the other Java apps the user uses. JRE 1.6.0_13 does not have the mixed code security (so it is like is disable), but JRE 1.6.0_27 does have the mixed code security and the applet will not launch with mixed code security enable, so we have to disable it. With all the hacking going on in the last two years, is important to improve security; so this is a must.
    Yes, I always clear up the cache.
    Any idea on how to resolve this problem?

  • Mail.app and huge memory leak

    Mail.app have some serious memleaks: http://jabster.nazwa.pl/MailAppMemLeak.mov (recorded from activity monitor). Mail.app can eat all memory and cause system to become unrespondable. Anyone have similar issue?

    Solved it!
    I have several email accounts configured in Mail. While Mail was eating up the memory, I've noticed the rotating circle at one of the accounts indicating Mail is doing something with it. This particular account was Google mail via IMAP. What I did to resolve problem is I deleted Google mail from my accounts and I've restarted Mail. Things turned back to normal! Then I've added GMail account again, and it is working like a charm since, Mail is using only 238Mb of memory.
    Therefore, I can conclude there is a bug in Mail handling email accounts (in my case Google mail via IMAP) and it is doing something with that account that increasingly takes ridiculous amounts of memory. Removing the account in questions, restarting Mail and adding the account again has solved the problem in my case :))
    Danny

  • Memory leaks with Njawin and COm Object

    I'm using njawin 1.1 to use a DRM Microsoft object form java and all works
    very well .... very good bridge !!
    But I found a problem that seems like a "memory leak" in calling a method,
    in this lines code :
    myLicense = myLicenseObj.GetLicenseToDeliver();
    System.out.println(myLicense);
    myResponseObj.AddLicense("2.0.0.0", myLicense);
    myResponseObj.setReplaceQuotesWith("\\\"");
    myLicResponse = myResponseObj.GetLicenseResponse();
    The only particularity in this code the length of myLicense string : 7 KB
    If I run the program 1000 times the server use 100 Mb of ram and not release
    them.
    I try to use ASP to replicate the problem but nothing happens ... the
    program works and not memory leak appears and than I think taht the probelm
    may be in marshalling / unmarshalling string routine from/to the DRM object
    Thanks a lot for all help

    Me funciono colocando el progID de la interfaz que genero jawin en el constructor de la clase que se genero, despues utilice los metodos y fue transparente:
    Interfaz que genero jawin:::
    public interface CodeIMG {
    public static final GUID clsID = new GUID("{23435XCVDF2-6D62-6749- 8E00-00AS45GH87JU}");
    public static final String progID = new String("ActivexPDF.CodeIMG");
    la clase que genero jawin:::::::
    public class _CodeWER extends DispatchPtr {
    public int getTypeInfoToken() {
    return 0;
    static public final GUID proxyIID = new GUID("{632PHK77-6F0B-11D4-8PLD-00A024A31CC6}");
    static public final int iidToken;
    static {
    iidToken = IdentityManager.registerProxy(proxyIID, _CodeWER.class);
    public int getGuidToken() {
    return iidToken;
    * Creates empty _CodeWER Object
    public _CodeWER() throws COMException {
    super();
    * Creates _CodeWER() Object with progID
    public _CodeWER()(String progid) throws COMException {
    super(progid);
    * Queries interface of _CodeWER  Object
    public _CodeWER()(IUnknown other) throws COMException {
    super(other);
    * Creates _CodeWER() Object with CLSID
    public _CodeWER(GUID ClsID) throws COMException {
    super(ClsID);
    public boolean createImg(ObjectRef strChain, ObjectRef strFile) throws COMException {
    return ((java.lang.Boolean) invokeN("createImg", new Object[]{strChain, strFile}, 2)).booleanValue();
    Test de Prueba:::::::
    public class TestDLL implements CodeIMG {
         public static void main(String[] args) {
              try {
                   CodeWER pdf = new CodeWER ( clsID );               
                   boolean ok = pdf.createImg(new ObjectRef("9999999"), new ObjectRef("C:\\image.bmp") );
                   System.out.println("Lo generoi bien:: " + ok );
              } catch (COMException e) {
                   e.printStackTrace();
    Espero te sirva este ejemplito sencillo de jawin
    Saludos!!!!!!!!!!!!
    att juo

  • 2008 R2 - Memory Leak from svchost.exe - Module "rpcrt4" is the culprit

    Hi All
    Over the past week or so (after a set of Windows updates and restart) svchost.exe has increasingly used more and more memory. It probably gobbles up an extra 1GB per day and doesn't relent. 
    After running various diagnostics, the debug diagnostic tool finally provided me this information after a memory leak test:
    rpcrt4.dll is responsible for 1.76 GBytes worth of outstanding allocations. The following are the top 2 memory consuming functions:
    rpcrt4!AllocWrapper+2b: 1.76 GBytes worth of outstanding allocations.
    rpcrt4!Ndr64ClientInitialize+964: 1.36 MBytes worth of outstanding allocations.
    Detailed module report(Memory)
    Module details for rpcrt4
    Module Name   rpcrt4 
    Allocation Count   946941 allocation(s) 
    Allocation Size   1.76 GBytes 
    Module Information 
    Image Name: C:\Windows\System32\rpcrt4.dll   Symbol Type:  PDB 
    Base address: 0x00000003`00905a4d   Time Stamp:  Sat Nov 20 13:13:18 2010  
    Checksum: 0x00000000`00000000   Comments:   
    COM DLL: True   Company Name:  Microsoft Corporation 
    ISAPIExtension: False   File Description:  Remote Procedure Call Runtime 
    ISAPIFilter: False   File Version:  6.1.7601.17514 (win7sp1_rtm.101119-1850) 
    Managed DLL: False   Internal Name:  rpcrt4.dll 
    VB DLL: False   Legal Copyright:  © Microsoft Corporation. All rights reserved. 
    Loaded Image Name:  rpcrt4.dll   Legal Trademarks:   
    Mapped Image Name:     Original filename:  rpcrt4.dll 
    Module name:  rpcrt4   Private Build:   
    Single Threaded:  False   Product Name:  Microsoft® Windows® Operating System 
    Module Size:  1.18 MBytes   Product Version:  6.1.7601.17514 
    Symbol File Name:  c:\symcache\rpcrt4.pdb\7D748DA6D7454C9EA38C8CEF1C9E75F22\rpcrt4.pdb   Special Build:  & 
    rpcrt4!AllocWrapper+2b  has 944,468 allocations! 
    I'm running 2008 R2 64bit with anywhere up to 80/100 simultaneous RDP connections at any one time.
    Can anyone help or advise as I cannot find any hotfixes for this issue.
    Thanks
    Ryan

    Hi Ryan,
    Please narrow it down to the specific service that is having the issue.  That way you will know where to focus on.
    For the specific svchost.exe that is showing the large memory usage, use task manager/process explorer/etc. to determine which service(s) are running within it.  If there are multiple services running within it, I recommend you isolate them and then
    restart your server.  For example, say you determined that the following services are running in the "problem" svchost.exe: AudioEndpointBuilder, Netman, TrkWks, UmRdpService, Uxsms.  You would open an admin command prompt and enter the following
    commands:
    sc config AudioEndpointBuilder type= own
    sc config Netman type= own
    sc config TrkWks type= own
    sc config UmRdpService type= own
    sc config Uxsms type= own
    After entering the above commands you would restart your server for the changes to take effect.  Over time you would monitor memory usage of the suspect services, and eventually it will become apparent which one is using too much memory.
    Thanks.
    -TP

  • Crystal Report Basic for VS 2008 Memory Leak

    Hi,
    I am having a problem with CR Basic for VS 2008.  I can display a report, which I have linked to an DataSet in C#, but when I close the window, I seem to have a memory leak, as verified by process explorer.
    I am doing the following when the report window is closing:
    myReportViewer.ReportSource = null;
    myReportViewer.Dispose();
    myReportObject.Close();
    myReportObject.Dispose();
    GC.Collect();
    Any ideas?  I have a significant report that is generated and the memory leak is quite significant.
    Thanks,
    Dave

    The memory management you are seeing is an artifact of how the framework manages memory allocations of managed dlls. These dlls are left in memory as it is expect that they may be used later on in your app and reloading these dlls would be a resource intensive process. It is difficult, if not impossible to unload managed dlls and there may not be a good solution.  However I suspect that once the managed dlls are loaded, you will see the memory moving in the 38,860 to 40,812 range. This memory will not be freed by the framework until the application is terminated.                                                                               
    Couple of ideas:                                                                               
    1) Trying to find resources on the possibility of unloading managed dlls. Apparently there is a way, but it is cumbersome. Couple of years ago, one of my coworkers spent some time on the issue and eventually gave upu2026 Looking around a bit, I have found the following links that may be of some use to you:                                                                               
    http://blogs.msdn.com/jasonz/archive/2004/05/31/145105.aspx                                                                         
    http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/a2682b53-12ad-4719-b05c-df1476cb39c9                             
    http://msdn.microsoft.com/en-us/library/system.appdomain.aspx ;                                                                      
    http://www.discussweb.com/c-programming/2391-how-unload-both-managed-unmanaged-dll.html ;                                                                               
    2) Try to see how the latest version of Crystal Reports behaves in your environment. Initially, I would suggest a test on a clean system with an eval version of Crystal Reports 2008. In CR 2008 we manage the memory via the crheapalloc.dll. So the behavior may be different. You can even try to see how CR 2008 behaves without the dll by simply renaming the dll.                                                                               
    An eval download of CR 2008 is here:                                                                               
    http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx                                                                               
    Ludek

  • Memory leak in string class

    We have developed our application in Solaris 10 environment. While running Purify on that it shows leak in the string class. This leak is incremental and so process size keeps in increasing. If we replace string with char array, the leaks disappears and process size also becomes stable.
    Following is the snapshot of the memory leak stack reported by Purify:
    MLK: 4505 bytes leaked in 85 blocks
    * This memory was allocated from:
    malloc [rtlib.o]
    operator new(unsigned) [libCrun.so.1]
    void*operator new(unsigned) [rtlib.o]
    __rwstd::__string_ref<char,std::char_traits<char>,std::allocator<char> >*std::basic_string<char,std::char_traits<char>,std::allocator<char> >::__getRep(unsigned,unsigned) [libCstd.so.1]
    char*std::basic_string<char,std::char_traits<char>,std::allocator<char> >::replace(unsigned,unsigned,const char*,unsigned,unsigned,unsigned) [libCstd.so.1]
    std::basic_string<char,std::char_traits<char>,std::allocator<char> >&std::basic_string<char,std::char_traits<char>,std::allocator<char> >::operator=(const char*) [libCstd.so.1]
    Has anyone faced this problem earlier or is there any patch available for this?

    Over time, we have found and fixed memory leaks in the C++ runtime libraries.
    Get the latest patches for the compiler you are using. (You didn't say which one.) You can find all patches here:
    [http://developers.sun.com/sunstudio/downloads/patches/index.jsp]
    Also get the latest Solaris patch for the C++ runtime libraries, listed on the same web page.
    If that doesn't fix the problem, please file a bug report at
    [http://bugs.sun.com]
    with a test case that can be compiled and run to demonstrate the problem.

  • Fixing Memory Leaks in AIR App?

    Hi Friends,
    I'm been facing this memory leaks issue in our app and this has taken enough of our time and resources and we are not being able to find a solution for it.
    I have identified the problem in the module where we primarily need memory related fixes which is - We are setting Repeater's recycleChildren() property to true/false based upon certain conditions which we cant change. Now when this property is set to false Repeater is supposed to be removing its last created objects from memory and creating fresh ones. In our case repeater is unable to delete those. When I managed to get their instances (using createdChildren()) and freed them in code I called System.gc() for releasing the memory back to OS. Now what is happening is that this approach works fine when I run the app from code but when I create its installer (from Installsheild) and formally out in on machines it does not work. I came to know the reason from following blogs:
    http://jvalentino.blogspot.com/2009/05/flex-memory-issue-3-garbage-collection.html
    http://gskinner.com/blog/archives/2006/06/as3_resource_ma.html
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/System.htm l#gc()
    http://stackoverflow.com/questions/192373/force-garbage-collection-in-as3
    http://gskinner.com/blog/archives/2006/08/as3_resource_ma_2.html
    Guys, can anyone of you suggest what should I do here? This has become a delivery bottleneck and we need to give a fix where the memroy is released periodically and efficiently so that the end user's system does not hang.
    Please help.
    Shubhra

    Are you sure it doesn't ? Maybe flash does release memory but the OS leaves it assigned as described in the below comment from http://www.mikechambers.com/blog/2008/08/06/what-are-your-biggest-issues-with-adobe-air/co mment-page-3/#comment-26330
    "I just finished doing more experiments, I looks like the AIR app  does free the memory, but the OS leaves it assignned to the app process,  until other apps requiere that memory. So, looks like it is a natural  behaviour and the memory leak is not as terrible as I thougth."

  • Detecting memory leaks in Managed C++

    In  my managed C++ application creating multiple variables dynamically using 'gcnew' and also some of the pointers being used. 
    Is there is any tool/mechanism to detect and avoid the memory leaks in Managed C++.
    saikalyan

    Hi saikalyan,
    Is there is any tool/mechanism to detect and avoid the memory leaks in Managed C++.
    You can use WinDbg tool to detect and avoid the memory leaks in Managed C++.
    Please check this article:
    http://www.codeproject.com/Articles/19490/Memory-Leak-Detection-in-NET
    Best regards,
    Shu Hu
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Memory leak problem while passing Object to stored procedure from C++ code

    Hi,
    I am facing memory leak problem while passing object to oracle stored procedure from C++ code.Here I am writing brief description of the code :
    1) created objects in oracle with the help of "create or replace type as objects"
    2) generated C++ classes corresponding to oracle objects with the help of OTT utility.
    3) Instantiating classes in C++ code and assigning values.
    4) calling oracle stored procedure and setting object in statement with the help of setObject function.
    5) deleted objects.
    this is all I am doing ,and getting memory leak , if you need the sample code then please write your e-mail id , so that I can attach files in reply.
    TIA
    Jagendra

    just to correct my previous reply , adding delete statement
    Hi,
    I am using oracle 10.2.0.1 and compiling the code with Sun Studio 11, following is the brief dicription of my code :
    1) create oracle object :
    create or replace type TEST_OBJECT as object
    ( field1 number(10),
    field2 number(10),
    field3 number(10) )
    2) create table :
    create table TEST_TABLE (
    f1 number(10),f2 number (10),f3 number (10))
    3) create procedure :
    CREATE OR REPLACE PROCEDURE testProc
    data IN test_object)
    IS
    BEGIN
    insert into TEST_TABLE( f1,f2,f3) values ( data.field1,data.field2,data.field3);
    commit;
    end;
    4) generate C++ classes along with map file for database object TEST_OBJECT by using Oracle OTT Utility
    5) C++ code :
    // include OTT generate files here and other required header files
    int main()
    int x = 0;
    int y = 0;
    int z =0;
    Environment *env = Environment::createEnvironment(Environment::DEFAULT);
    Connection* const pConn =
    env->createConnection"stmprf","stmprf","spwtrgt3nms");
    const string sqlStmt("BEGIN testProc(:1) END;");
    Statement * pStmt = pConn->createStatement(sqlStmt);
    while(1)
    TEST_OBJECT* pObj = new TEST_OBJECT();
    pObj->field1 = x++;
    pObj->field2 = y++;
    pObj->field3 = z++;
    pStmt->setObject(1,pObj);
    pStmt->executeUpdate();
    pConn->commit();
    delete pObj;
    }

Maybe you are looking for

  • Can't connect to wireless after pacman -Syu

    There are loads of wireless related questions on this forum and I'm sorry I have to add to them but I've had a look and couldn't find any posts similar to this issue so I'd thought I post this thread. I pacman'd ealier to update my laptop, installing

  • Time Capsule Backup to NEW MacBook Pro

    I'm selling my MacBook Pro and will get a new one soon. I have been backing up this MacBook Pro using my 1TB Time Capsule. Can I restore my NEW MacBook Pro using the backup from my OLD MacBook Pro from my Time Capsule? and if so, will I lose anything

  • 10.4.11 to Snow Leopard

    Will Snow Leopard install directly on an older macbook currently running 10.4.11, or are there intermediate steps required?

  • Excel chart alignment problems when creating PDF

    My excel chart is off set on my PDF page after creating PDF from Macro.  The chart is within my print areas in excel and no matter where I position the chart in excel the chart shows up like it is indented on the PDF and runs off the page.  I can pri

  • HTTP call in a workflow using GetFolderByServerRelativeUrl returns Forbidden

    This is using Office365 SPO with a 2013 workflow being created in the 2013 Designer. We are trying to make a workflow (whose steps will later on be part of a larger) that simply does an HTTP GET call. We have a url variable set to https://xxxxx.share