<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Bruno,<br>
    </div>
    <blockquote
cite="mid:CAO-SbSu_91O9gtKUsSruQA==1uxMXkDtbCw_hCetU=778YRQPw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>Hello, <br>
            <br>
          </div>
          I am creating an image from custom data pointer as follows,
          however, this does not result in freeing my memory after I
          delete the node and texture. How could this be?<br>
          <br>
          image->setImage(src->tileSize(), src->tileSize(),1,<br>
                                      GL_RGBA8,<br>
                                      GL_RGBA,<br>
                                      GL_UNSIGNED_INT_8_8_8_8_REV,<br>
                                      src->tileGridCoords(col,
          row).m_data.data(),<br>
                                      osg::Image::NO_DELETE);<br>
        </div>
      </div>
    </blockquote>
    You are telling OSG that you handle the memory yourself by stating
    NO_DELETE.<br>
    So basically you're responsible to delete it. <br>
    <br>
    Cheers<br>
    Sebastian <br>
    <blockquote
cite="mid:CAO-SbSu_91O9gtKUsSruQA==1uxMXkDtbCw_hCetU=778YRQPw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div><br>
                      // Setup texture<br>
                      osg::ref_ptr<osg::Texture2D> texture = new
          osg::Texture2D;<br>
                      texture->setImage(image.get());<br>
          <br>
                      // Avoid background border between tiles<br>
                      // <a moz-do-not-send="true"
href="http://stackoverflow.com/questions/19611745/opengl-black-lines-in-between-tiles">http://stackoverflow.com/questions/19611745/opengl-black-lines-in-between-tiles</a><br>
                      texture->setWrap(osg::Texture::WRAP_S,
          osg::Texture::CLAMP_TO_EDGE);<br>
                      texture->setWrap(osg::Texture::WRAP_T,
          osg::Texture::CLAMP_TO_EDGE);<br>
          <br>
                     
texture->setInternalFormatMode(osg::Texture2D::USE_S3TC_DXT1_COMPRESSION);<br>
                      texture->setUnRefImageDataAfterApply( </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
osg-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>