Memory leak while appending uchar16 * to PMString

Hi,
I am using code like
const uchar16 * TempWString ="Value";
PMString str("");
str.AppendW(TempWString);
this. here I am getting memory leak at the line str.AppendW(TempWString);
Can anyone help me out.
Thanks,
Amit.

It's JDK1.3.0 that I am using, didn't try to run it on 1.4

Similar Messages

  • Client-side Memory leak while executing PL/SQL and reading from a view

    Iam noticing memory leaks in OCCI while performing the following:
    Sample function()
    1. Obtain a connection
    2. Create a statement to execute a PL/SQL procedure
    3 Execute the statement created in step #2
    4. Terminate the statement created in step #2
    5. Create a statement to read from a view which was populated
    by executing stored procedure in step #3
    6. Execute the statement created in step #5
    7. Terminate the statement created in step #5
    8. Release the connection
    The PL/SQL populates a view with fixed 65,000 records for every execution. PL/SQL opens a cursor, loads 65000 records and populates the target view and closes the cursor at the end. If i invoke the above function it results in memory leak of 4M for every call. I tried several variants such as:
    1. Disabling statement caching
    2. Using setSQL instead of newly creating second SQL statement
    3. Obtaining two separate connections for these two activities (PL/SQL exec and View read)
    4. Breaking the sample function into two, one for each of these activities (PL/SQL exec and View read).
    All the combinations results in the same behaviour of 4M memory leak.
    Iam using Oracle 10g Client/Server 10.2.0.1.0.
    Is there any known limitations in this area?

    Yes. Iam closing the result set and terminating the statement.
    My program contains layers of inhouse wrapper classes, which will take some time for
    me to present it in pure OCCI calls, to be posted here for your understanding.
    After some more debugging, i found that if the connection level statement caching is set to
    0, the memory leak is much lower than before.
    Thanks.
    Message was edited by:
    user498920

  • Memory Leak while using -Xrunhprof option in Linux OS

    While using the follwing option in my application there is memory leak in JVM in Linux OS.
    -Xrunhprof:heap=all,cpu=times,monitor=y,file=/home/gemini/dilip/www2.log,thread=yIs this a bug ??

    Little lost here. Looks like you are facing memory leaks in Tuxedo 7.1 WS
    client code when it talks with Tuxedo 6.x? Is this correct?
    If so, try installing latest rolling patch for Tuxedo 7.1.
    We recently fixed couple of memory leaks in interop area. One was related to
    compression.
    _shailesh
    Scott Orshan <[email protected]> wrote in message
    news:[email protected]..
    If you are running with the latest patch, then report these problems to
    Support, giving them sample code so that they can reproduce the problem.
    Scott
    Thomas Winter wrote:
    Hi Scott,
    as an additional information:
    The guys at the server side changed something (their
    formaly useing the old 6.3 libraries at server side)
    and surprise... the client has no memory leak anymore.
    But, if more than one thread at the same time use the atmi calls
    there is still some memory consumption.
    The workaround is to use a mutex object to make sure, that
    only one thread use the atmi calls.
    AFAIS Tuxedo has an Problem with Multithreading.
    Thx
    Thomas

  • Mountain Lion memory leak while asleep?

    My early 2011 MBP started to randomly crash after installing ML and Safari would take an age to load, endless spinning wheels, apps not opening etc etc. So did a Boot sector permissions verify and repair (2 very minor mismatched files) then a reset of PRAM and SMC which has cured the crashes and improved things from startup and removed old Sophos and installed new ML version.
    But the biggest problem is when waking from sleep. I have a memory tool in my status bar which usually shows anything between 3.5 - 5gb free RAM under normal conditions (I have 8gb installed) and that is what will be showing when I put it to sleep. When waking I get constant spinning wheels, the clock is frozen (spinning wheel will start from Time Capsule icon all the way to Spotlight) and the RAM tool is displaying 45mb or less of free RAM. It takes at least 5 minutes for RAM to creep back up to 150mb or so when things will then start to become usable. But at this point I won't even get an internet connection until I use the memory tool to fee up more RAM. I've read of other problems regarding wireless connectivity when waking up but I'm using an ethernet connection. Once everything has calmed down and memory settled down MBP works flawlessly with no crashing and all apps working fine and there is a speed improvement but I shouldn't have to wait up to 10 minutes for my MBP to be usable. I did notice that when launching Sys Prefs the Time Machine tab caused it to freeze so could this have something to do with that?
    But what could be bleeding off the RAM while it's asleep?
    I'm so ****** off at this, never a problem with SL and definitely wishing I'd waited before doing this upgrade, it reminds me of my Windows Vista days!!!

    Hello.
    In my Macbook Pro 4GB RAM recently note memory leak when I opened Safari even with 1 or two windows open without refresh the web content.
    In Activity monitor could see consume Web Content the Safari Spend more the 2 GB RAM (Memory Real become Memory Inactive)
    Solution: Disable All Extensions and probe one to one. Finding that Fastesttube Extension was responsible.
    Check this Info
    http://atylmo.wordpress.com/2011/06/...d-fastesttube/
    Best Regards

  • Memory leak while debugging but not in release version

    I have an Adobe AIR application that must load and unload multiple external swfs, and it must run for hours.
    I had an issue where there was a memory leak. I tried all kinds of fixes, including rolling back SDKs and Adobe Runtime,
    but every time I tested in Flashbuilder, the memory would climb, and with each unload a FlexLoader would stay in memory.
    Finally I tried creating a release build, and low and behold the memory did not climb. It stayed the same even under stress testing.
    So evidently, the memory leak had to do with debug version, and once it was a release version, the leak disappeared.

    UPDATE: The problem was with the external swfs being loaded into the main application.
    If I compiled them in debug, they leaked. In release version they did not.

  • Memory leaks while playing mp3 in air 1.5

    Hello,
    I am trying to develop an mp3 player using Adobe Air (html + javascript). When I repeatedly load files using Sound class, memory usage is constantly increasing. I have observed this on OS X 10.6. using Activity Monitor. Air runtime is 1.5.3.9120
    Steps to reproduce:
    1. Load the sample below with adl
    2. Click on play. Observer memory usage of adl in Activity monitor
    3. Click on stop. The memory doesn't get reclaimed.
    Keep repeating steps 2 and 3 and observe the memory in Activity monitor.
    Any ideas as to why this happens? What am I doing wrong?
    Regards,
    Sasa
    The example:
    <html>
      <head>
        <script type="text/javascript" src="AIRIntrospector.js"></script>     
        <script type="text/javascript" src="AIRAliases.js"></script>
        <script type="text/javascript">
          function play(){
            var req = new air.URLRequest("file://test.mp3");
            snd = new air.Sound(req);
            //channel = snd.play();
          function stop(){
            //channel.stop();
            //channel = null;
            snd = null;
          function init(){
            document.getElementById('play').onclick = play;
            document.getElementById('stop').onclick = stop;
        </script>
      </head>
      <body onload="init();">
        <div id="play">play</div>
        <div id="stop">stop</div>
      </body>
    </html>

    Normally I would agree about letting the gc collect. However, in my case, memory usage increases to 300 MB after 8 hours of playing. It seems that GC didn't collect or I have some more leaks.I didn't have the time to investigate this some more.
    However, if gc doesn't collect for such a long time (possibly because there is more than enough free memory), I would prefer to invoke collection myself. If for no other reason, than because it doesn't look good for the end user to have perception that my app is using 300 MB when other applications are using only couple of MB up to 100 MB in the worst cases.

  • Memory leak using thin client

    Subject: Memory Leak while using thin client.
    From: [email protected] (Alon Albert)
    Newsgroups: weblogic.developer.interest.jndi
    I have a small test program that causes a memory leak while connecting
    to a weblogic server. The code is appended to the end of the msg. The
    problem is definatly caused by the InitialContext creation.
    Even if I explicitly call the InitialContext.close() method, the
    problem persists. I realize I can avoid the problem by using a one
    time connection outside the loop but keep in mind that this is only a
    test program. The full application REQUIRES me to do a full
    reconnection each time it is accessed.
    I have read in a previous simmilar post that the problem mught be RMI
    related. Is anything I can do about this?
    package jmxleak;
    import java.net.*;
    import java.util.*;
    import javax.management.*;
    import javax.naming.*;
    public class Main {
    String host;
    String username;
    String password;
    MBeanServer mbs;
    public static void main(String[] args) {
    while (true) {
    Main main = new Main(args[0], args[1], args[2]);
    main.connect();
    main = null;
    System.out.println("Collecting garbage.");
    System.gc();
    public Main(String host, String username, String password) {
    this.host = host;
    this.username = username;
    this.password = password;
    private void connect() {
    try {
    System.out.print("Connecting..., ");
    Thread.currentThread().setContextClassLoader(new
    URLClassLoader(new URL[] { new URL("http://" + host + "/classes/")}));
    Hashtable env = new Hashtable();
    env.put("java.naming.factory.initial",
    "weblogic.jndi.WLInitialContextFactory");
    env.put("java.naming.provider.url", "t3://" + host);
    if (username.length() > 0 && password.length() > 0) {
    env.put("java.naming.security.principal", username);
    env.put("java.naming.security.credentials", password);
    System.out.print("Creating context..., ");
    InitialContext ctx = new InitialContext(env);
    catch (Exception e) {
    e.printStackTrace();

    Subject: Memory Leak while using thin client.
    From: [email protected] (Alon Albert)
    Newsgroups: weblogic.developer.interest.jndi
    I have a small test program that causes a memory leak while connecting
    to a weblogic server. The code is appended to the end of the msg. The
    problem is definatly caused by the InitialContext creation.
    Even if I explicitly call the InitialContext.close() method, the
    problem persists. I realize I can avoid the problem by using a one
    time connection outside the loop but keep in mind that this is only a
    test program. The full application REQUIRES me to do a full
    reconnection each time it is accessed.
    I have read in a previous simmilar post that the problem mught be RMI
    related. Is anything I can do about this?
    package jmxleak;
    import java.net.*;
    import java.util.*;
    import javax.management.*;
    import javax.naming.*;
    public class Main {
    String host;
    String username;
    String password;
    MBeanServer mbs;
    public static void main(String[] args) {
    while (true) {
    Main main = new Main(args[0], args[1], args[2]);
    main.connect();
    main = null;
    System.out.println("Collecting garbage.");
    System.gc();
    public Main(String host, String username, String password) {
    this.host = host;
    this.username = username;
    this.password = password;
    private void connect() {
    try {
    System.out.print("Connecting..., ");
    Thread.currentThread().setContextClassLoader(new
    URLClassLoader(new URL[] { new URL("http://" + host + "/classes/")}));
    Hashtable env = new Hashtable();
    env.put("java.naming.factory.initial",
    "weblogic.jndi.WLInitialContextFactory");
    env.put("java.naming.provider.url", "t3://" + host);
    if (username.length() > 0 && password.length() > 0) {
    env.put("java.naming.security.principal", username);
    env.put("java.naming.security.credentials", password);
    System.out.print("Creating context..., ");
    InitialContext ctx = new InitialContext(env);
    catch (Exception e) {
    e.printStackTrace();

  • Memory leak in Tomcat 5.5

    Hi all, i am experiencing memory leaks while using tomcat 5.5 and mysql connector 3.1.7.. While running the attached code tomcat swallows up to 20 mb and doesnt return it. I close down everything but the app still leaks mem. For now it's not an issue (Tomcat stays below 60mb mem of 1gb), however running this app on serveral clients will dramatically increase the memory allocation.
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.awt.Image;
    import java.awt.Graphics2D;
    import java.awt.geom.AffineTransform;
    import java.awt.image.BufferedImage;
    import javax.swing.ImageIcon;
    import com.sun.image.codec.jpeg.JPEGCodec;
    import com.sun.image.codec.jpeg.JPEGImageEncoder;
    public class Thumbs extends HttpServlet {
      private String dbDriver = "com.mysql.jdbc.Driver";
      private String dbURL = "jdbc:mysql://localhost/webapp?";
      private String userID = "javauser";
      private String passwd = "javadude";
      private Connection dbConnection;
      //Initialize global variables
      public void init() throws ServletException {
      //Process the HTTP Get request
      public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        try{
           String maxDim = "";
           String siteString = request.getParameterValues("s")[0];
           if (request.getParameterValues("d") != null){
               maxDim = request.getParameterValues("d")[0];
           if (maxDim == ""){
               response.setContentType("image/jpeg");
               OutputStream out = response.getOutputStream();
               writePicture(out,siteString);
           else{
               if (siteString != null) {
                   int maxDimension = Integer.parseInt(maxDim);
                   response.setContentType("image/jpeg");
                   OutputStream out = response.getOutputStream();
                   writeThumbnailPicture(out, siteString, maxDimension);
        } catch (Exception ex){
            ex.printStackTrace();
            log(ex.getMessage());
      public void writePicture(OutputStream out, String siteID){
          try{
              Class.forName(dbDriver);
              dbConnection = DriverManager.getConnection(dbURL, userID, passwd);
              PreparedStatement stmt = dbConnection.prepareStatement("select * from webcatalog where ID = ?");
              stmt.setString(1,siteID);
              stmt.executeQuery();
              ResultSet rs = stmt.getResultSet();
              if (rs.next()) {
                  byte[] data = rs.getBytes("Picture");
                  if (data != null) {
                      Image inImage = new ImageIcon(data).getImage();
                      BufferedImage outImage = new BufferedImage(inImage.getWidth(null),
                                                                 inImage.getHeight(null),
                                                                 BufferedImage.TYPE_INT_RGB);
                      // Paint image.
                      Graphics2D g2d = outImage.createGraphics();
                      g2d.drawImage(inImage,null,null);
                      // JPEG-encode the image
                      JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
                      encoder.encode(outImage);
                      out.close();
              rs.close();
              stmt.close();
              dbConnection.close();
          }catch(Exception ex){
              ex.printStackTrace();
      public void writeThumbnailPicture(OutputStream out,String siteID,int maxDimension){
        try{
          Class.forName(dbDriver);
          dbConnection = DriverManager.getConnection(dbURL, userID, passwd);
          PreparedStatement stmt = dbConnection.prepareStatement("select * from webcatalog where ID = ?");
          stmt.setString(1,siteID);
          stmt.executeQuery();
          ResultSet rs = stmt.getResultSet();
          if (rs.next()) {
            byte[] data = rs.getBytes("Picture");
            if (data != null) {
              Image inImage = new ImageIcon(data).getImage();
              // Determine the scale.
               double scale = (double)maxDimension / (double)inImage.getHeight(null);
               if (inImage.getWidth(null) > inImage.getHeight(null)) {
                   scale = (double)maxDimension /(double)inImage.getWidth(null);
               // Determine size of new image.
               // One of them should equal maxDim.
               int scaledW = (int)(scale*inImage.getWidth(null));
               int scaledH = (int)(scale*inImage.getHeight(null));
               // Create an image buffer in
               //which to paint on.
               BufferedImage outImage = new BufferedImage(scaledW, scaledH,
                   BufferedImage.TYPE_INT_RGB);
               // Set the scale.
               AffineTransform tx = new AffineTransform();
               // If the image is smaller than
               // the desired image size,
               // don't bother scaling.
               if (scale < 1.0d) {
                   tx.scale(scale, scale);
               // Paint image.
               Graphics2D g2d = outImage.createGraphics();
               g2d.drawImage(inImage, tx, null);
               g2d.dispose();
               // JPEG-encode the image
               JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
               encoder.encode(outImage);
               out.close();
          rs.close();
          stmt.close();
          dbConnection.close();
        catch(Exception ex){
          ex.printStackTrace();
      //Clean up resources
      public void destroy() {
      private void jbInit() throws Exception {
    }

    you can try this:
    open your connection outside the function, and then pass it like as a parameter...
    writePicture(OutputStream out, String siteID, Connection conn)
    this can solve the problem because opening the connection inside the function spends a lot of memory...
    Hope this can help you
    Regards
    Fernando

  • Memory leak in MAX Preview resolved by build 411

    I was experiencing a memory leak while using the TLF that came as part of Flex 4 MAX Preview. Over the course of several hours, instances of a class called TextAccImpl would rapidly accumulate to the point where they accounted for over 50% of memory usage in my application, severely degrading performance.
    Upgrading to weekly build 411 resolved this issue - I didn't try with build 409 to see if it was also affected.
    Posting this as I wasn't sure if this entry in the change notes; "Fix a memory leak issue with the TextLayoutFormat cache" was related or not.

    If you modify the code just to call theCon=scp->getConnection(); and scp->releaseConnection(theCon); in an infinite loop, in as many threads as you like but initially in just one thread, does this program's memory usage stabilise or does it continue to use increasingly more and more memory until it crashes due to lack of memory?

  • 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

  • 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 UIButton setFont method

    Hi,
    Hope you all doing well, I am getting a memory leak while setting the font of UIButton. This is the code which I am using to set the font,
    [MyBtn.titleLabel setFont:[UIFont boldSystemFontOfSize:12]];
    whereas MyBtn is connected to IBOoutlet and I am not allocating memory to it.
    I don't see any thing wrong in the code. Hopefully someone will help me out, I will be really thankful.

    In instrument the responsible library is UIKit and UILabel is the leaked object so I am also not sure whether instrument is pointing the right line or not.
    Below is the function in which I am getting the leak,
    - (void) LayoutUI
    [bgImageView setImage:[UIImage imageNamed:@"bgImage.png"]];
    [topImageHeaderView setImage:[UIImage imageNamed:@"headerImage.png"]];
    [logoImageView setImage:[UIImage imageNamed:@"logo.png"]];
    [HeaderImageView setImage:[UIImage imageNamed:@"headerImageView.png"]];
    [BackBtn setTitle:@"Back" forState:UIControlStateNormal];
    [BackBtn.titleLabel setFont:[UIFont boldSystemFontOfSize:12]];
    [BackBtn setBackgroundImage:[UIImage imageNamed:@"back.png"] forState:UIControlStateNormal];
    //below is the Leaked line of code
    [BackBtn.titleLabel setTextColor:[UIColor colorWithRed:(50.0/256.0) green:(100.0/256.0) blue:(200.0/256.0) alpha:1]];
    [headerLbl setText:@"Header"];
    //below two lines are leaked
    [headerLbl setFont:[UIFont boldSystemFontOfSize:12]];
    [headerLbl setTextColor:[UIColor colorWithRed:(50.0/256.0) green:(100.0/256.0) blue:(200.0/256.0) alpha:1]];
    hopefully this will show a picture of what I am doing in my code.
    One more thing all these UIlabels and UIImage are connected to IBOoutlet so I am not allocating memory to any of them but though I have tried to dealloc all of them in dealloc method but it didn't help me out.

  • Memory leak in a function registered using set_restore_function()

    I experience a problem with memory leak caused by the following function:
    void RestorePhonemesSet(PhonemesSetStructType &phonemesSet, const void *src) {
    char p = (char ) src;
    memcpy(&phonemesSet.len, p, sizeof (int));
    p += sizeof (int);
    memcpy(&phonemesSet.whichFile, p, sizeof (int));
    p += sizeof (int);
    memcpy(&phonemesSet.whichPosition, p, sizeof (int));
    p += sizeof (int);
    phonemesSet.phonemes = (int *)malloc(sizeof(int)*phonemesSet.len);
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ here the problematic code
    memcpy(phonemesSet.phonemes, p, sizeof (int) * phonemesSet.len);
    This function is registered using a following call: DbstlElemTraits<PhonemesSetStructType>::instance()->set_restore_function(RestorePhonemesSet);
    The culprit it the malloc memory allocation. If I leave out the malloc the program crashes. If I free the phonemeSet.phonemes memory segment at the end of the restore function I lost data, and if I use the malloc there is a large memory leak while reading every record from the database.
    What should I do to prevent the memory leak?
    Regards,
    markur
    Edited by: 904259 on 2011-12-24 05:42

    the solution is using the memory allocated for p, no need to allocate new memory space for the variable: the problematic line should look like .phonemes = (int *)p;
    the memcpy function in the following line is thus superfluous.
    Edited by: 904259 on 2011-12-24 05:43

  • Memory leaks in NSURLConnection when using with ssl.

    Hi,
    I am experiencing a memory leak while using nsurlconnection with https request.
    I have a web-service over http and as well as HTTPS. When i call the web-service with HTTP i don't get any memory leak while when I call the web-service over HTTPS i got memory leaks, responsible library for this memory leak is cfnnetwork and responsible caller is nsurlrequest::setsslrequest.
    I just wanna make sure that should we have to set any property in nsurl for HTTPS request..
    I will be really helpful If someone can help me out.
    thanks in advance.

    I get the same(Or similar) issue... 48 Bytes for every call is being leaked. Instruments says that it's NSURLConnection that's leaking an NSString somewhere... Blowed if I can find why, build and analyse doesn't complain about that piece of code (Except that I'm releasing the url request late... i.e. by the caller instead of the method that allocates it. Naughty I know, but autorelease'ing the object had the same problem).
    This is on the simulator BTW...
    H

Maybe you are looking for

  • How do i search for a tag across 1063 folders (13361 pictures)

    I'm migrating from Element 8 and can't find any setting to find which of my 13361 pictures in 1063 folders have a tag I had defined

  • Send fillable form as PDF file

    Hello, I created a fillable PDF document using Adobe Acrobat XI Pro for MAC and at the bottom of the form, I added a button to send the form.  This form is being filled out by employes using Adobe Acrobat Reader.  They must fill out the form and clic

  • Installing fonts in Solaris 10 x86 10/08

    Hello, I request your help in solving an issue which I am facing. I installed Solaris 10 x86 version on my PC. Installation went on well. I opened a gnome-terminal to enter commands and issued few commands. However, the font did not match my taste. H

  • X-Rite ColorChecker Passport workflow?

    Anyone using an X-Rite ColorChecker Passport for adjusting color, or creating profiles? I'd like to do this for important shots, or shooting sessions with consistent light. It is very useful to shoot a test shot of the ColorChecker Passport and use i

  • AirDrop between Mac earlier than 2012 and iOS.. I can't believe it..

    Yes, I know: "In order to transfer files between a Mac and an iPhone, IPad or iPod touch, your iOS device needs iOS7 or later installed and your Mac needs to be a 2012 or later model." Is a MacBook Pro late 2011 really so obsolete? No solutions? I th