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".)

Similar Messages

  • Memory leaks in my application

    Hi all,
    My application is running well but the memory used by my application is not properly released. If my application is kept running for a day ..then the total system memory is used and server got struckup. can any body help me how can trace for the memory leaks in my application.
    Thanks in advance.
    Santhosh.gandhe

    What version of JDK are you running?
    The Java compiler leaks memory each time a class is compiled. Web applications containing hundreds of JSP files may as a result trigger out of memory errors once a significant number of pages have been accessed. The memory can only be freed by stopping Tomcat and then restarting it.
    The JSP command line compiler (JSPC) can also be used to recompile the JSPs.
    Note: This issue has been fixed in Sun JDK 1.4.x.

  • Memory leak with Swing application

    My application uses more and more memory as I use it. However, if it is working like I think, it is not creating more objects and has no reason to use more memory. When the application is minimized a lot of that memory is freed up. Does anyone know what is the cause of this? I have a sneaking suspicion that it is somehow related to my swingworkers. Also, if it is an error with my code how do I use the netbeans profiler to find the cause? I have just used the profiler for the first time - all I really can tell is that it seems to consume more and more memory.

    To answer a comment earlier in this thread, of course
    the jvm is doing garbage collection - that's the way
    java works. Nobody said otherwise. What was said was that the JVM doesn't necessarily release the memory. Just because the object has been collected doesn't mean the JVM is going to give it back to the OS.
    As I understand, when you do System.gc()
    this is apparently just a hint to the jvm to do
    garbage collection. To quote the api:
    "Calling the gc method suggests that the Java
    Virtual Machine expend effort toward recycling
    unused objects in order to make the memory they
    currently occupy available for quick reuse."Which is irrelevant. Furthermore, this thread is almost a year old.

  • Memory Leak in web application created using j2ee

    Hi,
    Our company has one web application, provided by "X" vendor. this application has many JSPs and many TLDs used. The basic behaviour of the apoplication is to connect to the database (Oracle) get the information and show it to the user.
    We deployed this web application in Tomcat 5.0.25 in the windows environment. One thing we observed here is, when we login to the application the tomcat5.exe process increses its memory. and when we logout, it does not come down to the original position. similar things happen when we search for some of the data using there provided searches.
    We have some code developed which uses httpclient to login to this web application (created for performace testing). This code initially logs in 50 users which goes fine, then logs in 100 users which also goes fine but after this 100 users we ran the code for 50 users agian but this time it threw OutOfmemory exception:Java heap space error.
    we are observing the memory in the Task Manager in windows.
    Can anyone tell me what could be the cause of this? is it the web application causing problem or is tomcat caching some pages into the memory and is not releasing them?

    Hi,
    Few questions!
    1> Have you tweaked your jvm?
    2> What are the values given for Xms and Xmx?
    3> What is the size of XX:MaxPermGen?
    4> How much RAM is available on the system where you have deployed your app?
    5> Are you using pre-complied JSPs for faster response?
    6> Which JDK are you using?
    7> Have you tried using latest version of Tomcat?
    8> If these doesnt help, use any profiler to find the leak. <JProfiler, JVMTI, YourKit profiler etc>
    I hope answering these questions would help you :)
    njoy!

  • Memory leak on SunOne Web Server 6.1 on application reload

    Hi!
    I am pretty sure that i have found a memory management problem in
    SunOne Web Server 6.1 .
    It started with an OutOfMemory error we got under heavy load . After
    some profiling with Jprofiler i didn't find any memory leaks in the
    application.Even under heavy load (generated by myself) i can't find
    anything ,more, i can't reproduce the error! The memory usage is
    about 20Mb and does not go up .
    However it is pretty simple to see the following behavior:
    [1] Restart the server (to have a clear picture) and wait a little for
    memory usage to stabilize.
    [2] In the application dir. touch .reload or one of the classes:
    The memory usage goes up by another 50Mb (huge amount of mem. taking
    into account the fact that it used only 20Mb under any load befor).
    Do this another time and another 20Mb gone etc..
    The JProfiler marks the memory used by classes . And it can be
    clearly seen the GC can't release most of it.
    I AM sure this is not the application that takes all the memory.
    Another hint : after making the server to reload application i can see
    that the number of threads ON EVERY RELOAD is going up by ~10-20
    threads .The # of threads goes lower over time but not the mem usage.
    My system:
    Sparc Solaris 9 ,Java 1.4.2_04-b05, Sun ONE Web Server 6.1SP5
    Evgeny

    my guess is that - because of '.reload' , web container tries to
    recompile all the classes that you use within your web application and
    hence the memory growth is spiking up.What do you mean by "tries to recompile"?The classes in
    Web-inf are already compiled! And i have only ~5 jsp's .
    (the most part of the applic. is a complicated business logic)
    If you are talking about reloading them ,yes,that's the purpose of .reload,
    isn't it? :).But it seems that container uses the memory for it's own
    classes: the usage of memory for my classes don't really grow
    that much (if at all) after reload (according to profiler)
    Also the real problem is that the memory usage grows to much for
    too long (neither seen it going down) and thus ends with OutOfMemory.
    if you are seeing the memory growth to be flat in stress environment,
    then I am not sure that why do you think that there is a memory leak ?There is no memory leak in stress environment.
    There is memory leak while reloading the application.
    It is a memory hog for sure (~20-30Mb for every reload).
    Memory leak?It seems that way because i can't see memory usage go
    down and after a lot of reloads OutOfMemory is thrown.
    also, what is jvm heap that you use ? did you try jvm tune options like -
    XX:+AggressiveHeap ?256Mb.I can set it bigger ,but how do i know that it will not just delay
    the problem ?
    Thanks for response.
    Evgeny

  • HTTPService + XML Load + Memory Leak

    Hi all....
    I have noticed a memory leak in my application. This leak was
    not apparent when the application was completed some months back
    which is what left me a little confused as all I have done since
    was upgrade to Flex 3 and possibly updated / changed my Flash
    player.
    I think I have found the cause to this problem (below) but am
    not 100% sure that it is the "actual" problem or any reasons to
    back my thoughts up, so have listed what I have checked / tried
    along the way (maybe I have missed something)....
    My Discovery Process:
    I started profiling my application but did not find anything
    out of the ordinary. I did a code walk-through double checking I
    had cleaned up after myself, removing and even nulling all items
    etc but still to now success - the leak is still there.
    I have profiled the app in the profiler for reasonably long
    periods of time.
    All the classes etc being used within the app are consistent
    in size and instance amount and there is no sign of any apparent
    leak.
    I am using a HTTPService that is loading XML data which I am
    refreshing every 5 seconds. On this 5 second data refresh some
    class instances are incremented but are restored to the expected
    amount after a GC has occurred. The GC seems to take longer, the
    longer the app is running, therefore more and more instances are
    being added to the app, but when the GC eventually runs it "seems"
    to clear these instances to the expected amount.
    After scratching my head for a while I decided to make a copy
    of my application, rip everything out, and focus in my data load,
    where I found a problem!
    I have now just a HTTPService that loads an XML file every 5
    seconds, and this is all I currently have in the app (as I ripped
    the rest of the code out), e.g:
    Code:
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    ....... creationComplete="initApp()" >
    <mx:HTTPService
    id="httpServiceResults"
    url="
    http://myIP:myPort/myRoot/myXML.cfm"
    resultFormat="e4x"
    result="httpResultHandler(event)" />
    <script....... >
    private var timerPulse:Timer;
    private function initApp():void
    httpServiceResults.send();
    timerPulse = new Timer(5000, 0);
    private function httpResultHandler(event:ResultEvent):void
    timerPulse.start();
    timerPulse.addEventListener(TimerEvent.TIMER, timerRefresh);
    public function timerRefresh(eventObj:TimerEvent):void
    timerPulse.stop();
    timerPulse.removeEventListener(TimerEvent.TIMER,
    timerRefresh);
    timerPulse.reset();
    httpServiceResults.send();
    </script>
    </mx:Application>
    This is pretty much the code I am currently using and it
    leaks.
    I ran and monitored this in both the profiler and the
    activity / task manager, and after running the app for 1800 seconds
    (30 min) in the profiler, the memory size grew from 50mg to 165mg
    just sending the HTTPService.
    I tried loading the service in multiple ways including in AS
    rather than MXML creating new instances of it each time, resetting
    it, nulling it etc... but nothing prevented this memory increase.
    I then tried to load the XML using different methods such as
    using the URLRequest and URLLoader which again caused a memory
    leak.
    What still confuses me is that this leak did not exist in the
    previous version and not a great deal has changed since then apart
    from upgrading to Flex 3 and possibly upgrading my Flash payer
    (which I believe is a possible cause)
    After looking into this issue a bit more deeply, I read a few
    blogs / forums and other people are experiencing the same problems
    - even with a lot bigger leaks in some cases all when reloading
    large sets of XML data into Flex - however, I as of yet found no
    solution to this leak - people with a similar problem believe it is
    not due to a memory leak more a GC error, and others pointing
    towards the Flash Player itself that is leaking - I don't really
    know.
    Findings so far during investigation of this issue:
    * App leaks for both HTTPService and ULRRequest / URLLoader
    methods
    * App only leaks when calling a data loader
    * The size of the leak seems to depend on the size of the
    XML being loaded
    * The size of the leak also seems to be affected by the
    applications heaviness - the greater seems to enhance the leak
    An interesting factor I have noticed is that if I copy the
    XML from my "myXML.cfm" that I link to in my HTTPService and copy
    the contents of the file into my own XML file stored within the
    Flex project root itself: ""myXML.xml"" the leak disappears... like
    it seems to link when loading the XML over a network, however as my
    network knowledge is not great I am not sure what to make of this -
    any ideas???
    Could the connection to the XML document cause leaks??? is
    there anything else that could cause this leak??? have I something
    in my code sample that could cause this leak??? or could any of the
    other things I have mentioed cause this leak???
    Any help / ideas would be greatly appreciated.
    Thanks,
    Jon.

    I also observed heavy memory leak from using httpservice with
    XML data. I am using Flex3 builder under Linux. My Flex application
    polls httpservice every 10 seconds. The reply is a short XML
    message less than 100 bytes. This simple polling will consume 30+
    MB of memory every hour. I leave it idling for several hours and it
    took 200 MB of memory. No sign of garbage collection at all.

  • Memory Leak in BlazeDS

    I have used BlazeDS in an  application to push the data in realtime. However, we have been  experiencing a heavy memory leak in the application. The application has  a scheduler that pushes the data every one minute into the default  queue. Without any browsers opened, the appication remain stable. And  closing the browsers also cleans up the FlexClient object and other  associated objects for that browsers. But the leak occurs when we open  and keep browsers for a long period, say 2 to 3 days. The memory usage  of application gradually increases and throws a  "java.lang.OutOfMemoryError: Java heap space" Exception. On analyzing  the HeapDump, I found that there are thousands of AsyncMessage Objects  in the memory, not getting garbage-collected. This the channel definiton  congured in services-config.xml file
            <channel-definition id="my-polling-amf" class="mx.messaging.channels.AMFChannel">
                <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
                <properties>
                    <polling-enabled>true</polling-enabled>
                    <polling-interval-seconds>4</polling-interval-seconds>
                    <invalidate-session-on-disconnect>true</invalidate-session-on-disconn ect>
                </properties>
            </channel-definition>
    Does anyone know the cause of this issue and how it can be overcome. Please help.

    We also have the same problem. The JVM goes out of memory every 24 - 50hrs. I have documented a working fix for the problem on the JVM side.
    http://in-finite.me/fixing-blazeds-polling-amf-memory-leak/@

  • Memory leak in Solaris - SunOS 5.7, jre1.3.1

    Hi,
    I hava a java application that spawns about 100 threads. Each thread sends a request to WebLogic server 6.1. We are using Oracle 8.1.7. They are all running in a Sun box, 2 CPUs and 6gig memory.
    JRE = 1.3.1
    SunOS = 5.7
    Weblogic = 6.1
    Oracle = 8.1.7
    (All running on the same box)
    When we start the client application, running top shows that ,
    the client JVM process - uses 40 MB of memory
    WebLogic - uses 250 MB of memory
    But the available memory comes down drastically (almost by 350 MB), and on bringing both the client and weblogic down, we are not able to get this 350 MB back
    Running JProbe, doen not show any memory leak in our application
    we are using the hotspot client version
    -Xms = 128m
    -Xmx = 128m
    Any help is appreciated

    It looks like i am also facing the same problem with my application . If by some chance you were able to solve this problem do send a mail to [email protected] I just posted the question. while searching the web i found your question which looks similar but not answered. Hope you could give me some input
    Thanks

  • Memory leak in "Tenured Generation" heap (JVM 1.5)?!

    For about over a year, I'm trying to hunt down the memory leak in our server application. But after all the improvements I've made (especially with 'forgotten' listeners that didn't exist anymore), I'm confident that the application doesn't have a memory leak anymore. At least the new "jconsole.exe" tool of JDK 1.5 shows me a very intersting behaviour:
    Even if the server app is doing nothing than one thread polling a database table for possible new jobs to process, the memory slightly increases over time ... very slightly. It's just like the screenshot at
    http://java.sun.com/j2se/1.5.0/docs/guide/management/jconsole.html#memory
    where you might find a very slight tendency up. I run jconsole the whole day to track the application on a computer where no jobs got processed, so the application only sit there there whole day and just one thread has a loop that polls a database table via JDBC and doesn't get a result. The result is, that the memory chart is like the chart in the screenshot of the link above just with much more jaggies. About every 20 minutes, garbage collection seems to kick in, as the jaggie line drops about several megabytes just to increase again slowly.
    Of course the thread loop creates objects but it doesn't hold any (debugged it several times and it is quite easy code). So this behaviour makes sense. But it doesn't make sense that the memory usage overall slowly increases over many hours (ultimativaly leading to an OutOfmemoryError).
    So far, I still thought, it must be a memory leak in my application. But then, I played with jConsole and noticed this: if I just display the Memory Pool "Eden Space", the jagged line always drops down to the same level, i.e. no memroy leak. The "Survivor Space" is also constant in average (no memory leak). But the "Tenured Generation" line shows this memroy leak behaviour (slowly increases). This space is described as:
    Tenured Generation (heap): pool containing objects that have existed for some time in the survivor space.
    So, I'm not so sure anymore if this memory must be in my application. Unfortunately, jConsole doesn't show some kind of object tree that can be browsed and I would see what kind of object (collection) increase.
    I tried profiling my application, but the profiled app runs so slowly that it would need many days or weeks until it's possible to identify some bad objects.
    Is there another way to identify such memory waisters?

    Write a main() that does the polling in a tight loop 1000 times. Then System.gc(); Thread.sleep(1000); System.exit(). Run the thing with -Xrunhprof. Observe the "live bytes" and "live objs" columns in the generated java.hprof.txt file. Anything that strikes as suspicious? If every polling round leaks one object, there's likely to be 1000 (or N*1000) of something live. Make sure the leak is in the polling routine by running it 1,000,000 rounds and getting an OutOfMemory.

  • 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 leak using Oracle thin driver on wls6.1...

    Hi, I've been attempting to find a memory leak in an application that
    runs on WLS 6.1 SP2, on Solaris 8 and accessing an Oracle 9i db. We
    are using the Type 4 (Thin) driver and JProbe reports that hundreds of
    oracle.jdbc.* objects are left on the heap after my test case
    completes. Specifically oracle.jdbc.ttc7.TTCItem is the most common
    loiterer on the heap. I have verified that after each database access
    the resources are release correctly (i.e. ResultSet, Connection,
    PreparedStatement, etc.)
    Has anyone encountered similar problems? or does anyone know how to
    fix this?
    Thanks,
    Tim Watson

    Hi Tim!
    We have seen problem using oracle 817 client that has been resolved using
    901 client for type2(oci) driver, But i am not aware of thin driver
    problem. You should check with oracle if they have find any customer's
    with this problem.
    Thanks,
    Mitesh
    Tim Watson wrote:
    Hi, I've been attempting to find a memory leak in an application that
    runs on WLS 6.1 SP2, on Solaris 8 and accessing an Oracle 9i db. We
    are using the Type 4 (Thin) driver and JProbe reports that hundreds of
    oracle.jdbc.* objects are left on the heap after my test case
    completes. Specifically oracle.jdbc.ttc7.TTCItem is the most common
    loiterer on the heap. I have verified that after each database access
    the resources are release correctly (i.e. ResultSet, Connection,
    PreparedStatement, etc.)
    Has anyone encountered similar problems? or does anyone know how to
    fix this?
    Thanks,
    Tim Watson

  • Memory leak resolved - JDK 1.4.2_06 vs. 1.5.0_11

    Hello - (I am not a Java expert)
    Can someone tell me how JDK 1.5 (now known as 5.0) fixed my memory leak issue? I just upgraded from JDK 1.4.2_06 to 1.5.0_1. I had issue of memory leaks on an application running on my web server utilizing Tomcat 5.0.28. After the upgrade, the memory leaks disappeared and my heap size remain the same. Seems that GC is working now. What does 1.5 have that 1.4 didn't have? Just curious.
    Thank you
    Jayson
    Application Support

    It had some bugfixes. Check the release notes of the intervening versions to determine exactly which memory related issues got fixed.
    Without seeing your code it's impossible to determine which particular issue you were suffering from.

  • How to deal with Memory Leaks, that are caused by Binding

    Hi, I recently noticed (huge?) memory leaks in my application and suspect bindings to be the cause of all the evil.
    I made a little test case, which confirms my suspicion:
    import javafx.application.Application;
    import javafx.beans.property.SimpleStringProperty;
    import javafx.beans.property.StringProperty;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    public class TestAppMemoryLeak extends Application {
        public static void main(String[] args) {
            launch(args);
        @Override
        public void start(Stage stage) throws Exception {
            VBox root = new VBox();
            Button button = null;
            for (int i = 0; i < 100000; i++) {
                button = new Button();
                button.textProperty().bind(text);
                button.textProperty().unbind(); // if you don't call this, you can notice the increased memory of the java process.
            root.getChildren().add(button);
            Scene scene = new Scene(root);
            stage.setScene(scene);
            stage.show();
        private StringProperty text = new SimpleStringProperty("test");
    }Now the problem is, HOW can I know, when a variable is no longer needed or overwritten by a new instance.
    Just an example:
    I have a ListView with a Cell Factory. In the updateItem method, I add a ContextMenu. The textProperty of each MenuItem is bound to a kind of global property, like in the example above. I have to do it in the updateItem method, since the ContextMenu differs depending on the item.
    So every time the updateItem method is called a new ContextMenu is created, which binds some properties, but the old context menus remain in memory.
    I guess there could be many more example.
    How can I deal with it?

    I've dealt with this situation and created a Jira issue for it, but I also have a work-around that is a bit unwieldy but works. I'll share it with you.
    The bug that deals with this (in part atleast): http://javafx-jira.kenai.com/browse/RT-20616
    The solution is to use weak invalidation listeners, however they are a bit of a pain to use as you cannot do it with something simplistic as "bindWeakly"... and you need to keep a reference around to the wrapped listener otherwise it will just get garbage collected immediately (as it is only weakly referenced). Some very odd bugs can surface if weak listeners disappear randomly because you forgot to reference them :)
    Anyway, see this code below, it shows you some code that is called from a TreeCell's updateItem method (I've wrapped it in some more layers in my program, but it is essentially the same as an updateItem method):
    public class EpisodeCell extends DuoLineCell implements MediaNodeCell {
      private final WeakBinder binder = new WeakBinder();
      @Override
      public void configureCell(MediaNode mediaNode) {
        MediaItem item = mediaNode.getMediaItem();
        StringBinding episodeRange = MapBindings.selectString(mediaNode.dataMapProperty(), Episode.class, "episodeRange");
        binder.unbindAll();
        binder.bind(titleProperty(), MapBindings.selectString(mediaNode.dataMapProperty(), Media.class, "title"));
        binder.bind(ratingProperty(), MapBindings.selectDouble(mediaNode.dataMapProperty(), Media.class, "rating").divide(10));
        binder.bind(extraInfoProperty(), Bindings.when(episodeRange.isNull()).then(new SimpleStringProperty("Special")).otherwise(episodeRange));
        binder.bind(viewedProperty(), item.viewedProperty());
        subtitleProperty().set("");
    }This code makes use of a class called WeakBinder -- it is a helper class that can make Weak bindings and can keep track of them. When you call unbindAll() on it, all of the bindings it created before are released immediately (although they will also disappear when the Cell itself is garbage collected, which is possible because it only makes weak references).
    I've tested this extensively and it solves the problem of Cells keeping references to objects with much longer life cycles (in my case, the MediaNode passed in has a longer lifecycle than the cells and so it is important to bind weakly to it). Before this would create huge memory leaks (crashing my program within a minute if you kept refreshing the Tree)... now it survives hours atleast and the Heap usage stays in a fixed range which means it is correctly able to collect all garbage).
    The code for WeakBinder is below (you can consider it public domain, so use it as you see fit, or write your own):
    package hs.mediasystem.util;
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.List;
    import java.util.Map;
    import javafx.beans.InvalidationListener;
    import javafx.beans.Observable;
    import javafx.beans.WeakInvalidationListener;
    import javafx.beans.property.Property;
    import javafx.beans.value.ObservableValue;
    public class WeakBinder {
      private final List<Object> hardRefs = new ArrayList<>();
      private final Map<ObservableValue<?>, WeakInvalidationListener> listeners = new HashMap<>();
      public void unbindAll() {
        for(ObservableValue<?> observableValue : listeners.keySet()) {
          observableValue.removeListener(listeners.get(observableValue));
        hardRefs.clear();
        listeners.clear();
      public <T> void bind(final Property<T> property, final ObservableValue<? extends T> dest) {
        InvalidationListener invalidationListener = new InvalidationListener() {
          @Override
          public void invalidated(Observable observable) {
            property.setValue(dest.getValue());
        WeakInvalidationListener weakInvalidationListener = new WeakInvalidationListener(invalidationListener);
        listeners.put(dest, weakInvalidationListener);
        dest.addListener(weakInvalidationListener);
        property.setValue(dest.getValue());
        hardRefs.add(dest);
        hardRefs.add(invalidationListener);
    }Let me know if this solves your problem.

  • Memory leak with fieldpoint and labview

    I have an application which is showing an issue of a memory leak.  The application does several things, but the part that seems to be causing the trouble is related to use of Fieldpoint VIs.  The application reads individual AI channels on a Fieldpoint AI-110 (10 channels, where the set of channels is measured once per second)  I have attached the code related to this.  The memory leak is quite large (~1.5GB in 24 hours of operation).
    I am using LabView 7.1, and Fieldpoint 4.1.  The parent application which uses the attached code is a stand-alone application.  The operating system is Windows 2000.  Fieldpoint communication occurs over a RS-232 link.
    Thanks in advance,
    Andy
    Attachments:
    FPAI100_meas_voltage.vi ‏62 KB

    Hi Andy,
    I did not see anything fundamentally wrong with what you wrote, but there were
    a few things that I think could be used to be changed.  However, there
    were a few things that I did modify that might make a bit of a
    difference.  In your application you were using sequences and a bunch of
    local variables.  Since LabVIEW is based upon data flow, you can control
    the sequence of execution by making data dependencies and simply wiring one
    thing to the next.  By simply using LabVIEW the way it is meant to run I
    was able to completely remove the sequence structure and also eliminate the use
    of all of the local variables, all while having the exact same execution order. 
    It could be that the local variables were causing the memory leak that you
    noticed, but I really doubt they could be the cause of such a large leak. 
    I really think there is probably something else going on in the application
    because from what I saw from this bit of code there really is no way that it
    would have such large problems.  Users use the FP commands daily without
    any problems, so most likely these are not the root of the problem.
    Go ahead and try the modified code and see if you can implement similar local
    and global variable reducing techniques throughout your application. 
    Hopefully that will help reduce some of the memory leaks you are seeing. 
    Typically the largest cause of an apparent memory leak really occurs from
    building an array within a loop, so make sure you don't have any situations
    where that occurs in your code either.
    Regards,
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments
    Attachments:
    724727-FPAI100_meas_voltage.vi ‏56 KB

  • Memory leak with Power Spectrum function

    Hi
    I have a memory leak on my application. By observing with the "Desktop Execution Trace Toolkit", the Power Spectrum function (from NI_AALPro.lvlib) seems to have two "Reference leak".
    The first one refers to the function "Open VI reference"; I got around this problem by replacing the "Open VI reference" by an "Initialize" input boolean, but I don't understand the second memory leak.
    Any idea ?
    Thanks...
    (See attachments : Desktop Execution Trace + code)
    LV8.6.1 + Desktop Execution Trace Toolkit 2009
    Same problem with LV2012 + Desktop Execution Trace Toolkit 2012
    Attachments:
    DesktopExecutionTraceToolkit.png ‏82 KB
    MemoryLeakPowerSpectrum.zip ‏7 KB

    Hi Mathilde,
    Thank you for using NI Discussion Forums!
    I reproduce this problem with LV2012 + Desktop Execution Trace Toolkit 2012. I will look further into this.
    Are there many calls of this function in your code? Could it be a problem for you?
    Thank you.
    Regards,
    Audrey_P
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Journées techniques : des fondamentaux aux dernières technologies pour la mesure et le contrôle/comm...

Maybe you are looking for

  • ICal on iPhone scrolls and duplicates

    I have endlessly googled and searched support for this problem, but I can't find anyone else who has it. When I look at my calendar on iPhone 4 in list or day views, the events will start to duplicate before my eyes and the dates will scroll backward

  • Refresh Idoc Problems

    After a refresh what are the critical objects to check besides Partner Profiles for Idocs. We have an issue that we thought we changed everything necassary, but we still have an issue in the outbound SAP idoc that says stat 26 first:EDI:Syntax error

  • Saving pdfs on an iPhone

    Does anyone know how to save pdf mail attachments to the iPhone so they can be opened outside of Mail?

  • Unknowned Error when Refreshing Objects in Excel 2007

    Business Objects Server Version: Business Objects XI 3.1 MS Office: 2007 Live Office: 12.1.4.1068 Crystal Reports: 2008 Issue: When attempting to refresh the objects for either Crystal Reports or a WebI Document, I receive an "Unknowned Error" messag

  • Titles in LR mobile

    Friends, Is it possible to add titles, captions, etc. to images downloaded to the iPad through LR mobile?  If so, how do I do it, and will these titles sync to the desktop?  I looked in the manual and couldn't find it, or I missed it. Thanks! Steve