<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Could you explain this DLL locking thing? It would seem to be a sad day
for shared libraries if only one executable could use them at a time!
Or is it an issue that executables don't pick up recent changes to the
shared library, preferring to use the OS cached version instead?<br>
<br>
I think that OGRCleanupAll() only deletes the currently registered
drivers, no? Does it actually unload the shared library? Is there an
equivalent GDAL function, BTW, GDALDeregisterAll()?<br>
<br>
Cheers,<br>
<br>
Sy<br>
<br>
Richard Matsunaga wrote:
<blockquote cite="mid000701c7c3d5$a0ca2080$cd012b0a@Richard" type="cite">
  <pre wrap="">This would likely help me out a great deal, as well as anyone using GDAL
inside of an ASP.NET web site.

Cheers,
Richard

  </pre>
  <blockquote type="cite">
    <pre wrap="">-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:gdal-dev-bounces@lists.maptools.org">gdal-dev-bounces@lists.maptools.org</a> 

Frank,

OGRCleanupAll() is not exposed to SWIG right now. Should we 
add this function to the interface?

Best regards,

Tamas


2007/7/11, Frank Warmerdam <a class="moz-txt-link-rfc2396E" href="mailto:warmerdam@pobox.com">&lt;warmerdam@pobox.com&gt;</a>:
    </pre>
    <blockquote type="cite">
      <pre wrap="">Richard Matsunaga wrote:
      </pre>
      <blockquote type="cite">
        <pre wrap="">Thanks Tamas, I didn't look deep enough to see what was 
        </pre>
      </blockquote>
    </blockquote>
    <pre wrap="">happening in 
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre wrap="">the C++ code for Dataset.

My problem is that our application is an ASP.NET web site and as 
soon as a class instantiates a GDAL or OGR object, the 
        </pre>
      </blockquote>
    </blockquote>
    <pre wrap="">GDAL dll gets 
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre wrap="">locked and is only released after some long period of 
        </pre>
      </blockquote>
    </blockquote>
    <pre wrap="">idle time or if iisreset is called.
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre wrap="">This makes updating GDAL (or just republishing the entire 
        </pre>
      </blockquote>
    </blockquote>
    <pre wrap="">website) a 
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre wrap="">bit of a pain. I was initially worried that there may be a memory 
leak in there as well, but that seems to not be the case.

The problem is easily reproduced using NUnit as well. Any 
        </pre>
      </blockquote>
    </blockquote>
    <pre wrap="">test case 
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre wrap="">that uses a GDAL resource will lock the GDAL dll as well.

I just tried calling Ogr.RegisterAll() and it is the cause of the 
lock on the dll. There seems to be no way of releasing resources 
initialized by RegisterAll(). Not surprisingly, this behaviour is 
also flagged as a memory leak (albeit a small one) by 
        </pre>
      </blockquote>
    </blockquote>
    <pre wrap="">DevPartner when using OGR in an application.
    </pre>
    <blockquote type="cite">
      <pre wrap="">Richard / Tamas,

I'm not clear on what this "DLL locking" is all about, but at the C 
level there is an OGRCleanupAll() function which will 
      </pre>
    </blockquote>
    <pre wrap="">deregister OGR 
    </pre>
    <blockquote type="cite">
      <pre wrap="">drivers as well as cleanup some other memory allocations.

Best regards,
--

      </pre>
    </blockquote>
    <pre wrap="">---------------------------------------+------------------------------
    </pre>
    <blockquote type="cite">
      <pre wrap="">---------------------------------------+--------
I set the clouds in motion - turn up   | Frank Warmerdam, 
      </pre>
    </blockquote>
    <pre wrap=""><a class="moz-txt-link-abbreviated" href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>
    </pre>
    <blockquote type="cite">
      <pre wrap="">light and sound - activate the windows | <a class="moz-txt-link-freetext" href="http://pobox.com/~warmerdam">http://pobox.com/~warmerdam</a>
and watch the world go round - Rush    | President OSGeo, 
      </pre>
    </blockquote>
    <pre wrap=""><a class="moz-txt-link-freetext" href="http://osgeo.org">http://osgeo.org</a>
    </pre>
    <blockquote type="cite">
      <pre wrap="">
      </pre>
    </blockquote>
    <pre wrap="">_______________________________________________
Gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Gdal-dev@lists.maptools.org">Gdal-dev@lists.maptools.org</a>
<a class="moz-txt-link-freetext" href="http://lists.maptools.org/mailman/listinfo/gdal-dev">http://lists.maptools.org/mailman/listinfo/gdal-dev</a>
    </pre>
  </blockquote>
  <pre wrap=""><!---->
_______________________________________________
Gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Gdal-dev@lists.maptools.org">Gdal-dev@lists.maptools.org</a>
<a class="moz-txt-link-freetext" href="http://lists.maptools.org/mailman/listinfo/gdal-dev">http://lists.maptools.org/mailman/listinfo/gdal-dev</a>
  </pre>
</blockquote>
<br>
</body>
</html>