Re: Finally have cleared the leaks ...

10bxjfhf <[email protected]> Thu, 26 Mar 2020 11:42:08 -0700
Newsgroups gmane.comp.video.graphicsmagick.apis
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============3058632717983070451==
Content-Type: multipart/alternative;
 boundary="------------588B1319AFFBA85EE831902A"
Content-Language: en-US

This is a multi-part message in MIME format.
--------------588B1319AFFBA85EE831902A
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit


On 2020-03-26 7:20 a.m., Bob Friesenhahn wrote:
> On Wed, 25 Mar 2020, 10bxjfhf wrote:
>> Deleting or renaming the log.mgk files did not always seem to help. 
>> IIRC, it will simply use the built-in defaults if it does not manage 
>> to find log.mgk and that is cast in stone once compiled.
>
> The functions I recently added allow you to change the "built-in 
> defaults" before invoking InitializeMagick().
All is good right now for logging as far as I have tested it - see below
> I don't understand "a lot of work".
>>
>> I must call
>>
>> InitializeMagick(NULL);
>>  MagickLib::DestroyMagick();
>>
>> and let it go through its gyrations;  then initialize the library 
>> again, just to be able to implement the necessary environment 
>> variables, independent of any other app I might have installed, and 
>> to allow me to override some of the built-in defaults.
>
> Isn't this "a lot of work" due to the automatic DLL initialization 
> that you are easily able to disable and is now disabled by default?

 From your earlier message from 2020-03-23, 12:32 p.m

In the mean time, this sequence should work:

InitializeMagick(NULL);

DestroyMagick();

  [ Do some defaults configuration ]

InitializeMagick(NULL);

After cloning the latest version of GM and running configure, I checked 
to make sure ProvideDllMain was disabled when I built my current app.
Just now, I tried to run my app without the first two lines and all 
worked as expected.

So, yes, if ProvideDllMain is not disabled, I (probably) would have to 
jump through those extra hoops - my misunderstanding

Again, thank you for the mods and your help; I think I'll be good for a 
while - at least I hope so :-)

Arnold



--------------588B1319AFFBA85EE831902A
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 2020-03-26 7:20 a.m., Bob
      Friesenhahn wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:[email protected]">On
      Wed, 25 Mar 2020, 10bxjfhf wrote:
      <br>
      <blockquote type="cite">Deleting or renaming the log.mgk files did
        not always seem to help. IIRC, it will simply use the built-in
        defaults if it does not manage to find log.mgk and that is cast
        in stone once compiled.
        <br>
      </blockquote>
      <br>
      The functions I recently added allow you to change the "built-in
      defaults" before invoking InitializeMagick().
      <br>
    </blockquote>
    All is good right now for logging as far as I have tested it - see
    below<br>
    <blockquote type="cite"
      cite="mid:[email protected]">I
      don't understand "a lot of work".
      <br>
      <blockquote type="cite">
        <br>
        I must call
        <br>
        <br>
        InitializeMagick(NULL);
        <br>
         MagickLib::DestroyMagick();
        <br>
        <br>
        and let it go through its gyrations;  then initialize the
        library again, just to be able to implement the necessary
        environment variables, independent of any other app I might have
        installed, and to allow me to override some of the built-in
        defaults.
        <br>
      </blockquote>
      <br>
      Isn't this "a lot of work" due to the automatic DLL initialization
      that you are easily able to disable and is now disabled by
      default?
      <br>
    </blockquote>
    <p>From your earlier message from 2020-03-23, 12:32 p.m</p>
    <pre>In the mean time, this sequence should work:

InitializeMagick(NULL);

DestroyMagick();

 [ Do some defaults configuration ]

InitializeMagick(NULL);

</pre>
    After cloning the latest version of GM and running configure, I
    checked to make sure ProvideDllMain was disabled when I built my
    current app.<br>
    Just now, I tried to run my app without the first two lines and all
    worked as expected.<br>
    <p>So, yes, if ProvideDllMain is not disabled, I (probably) would
      have to jump through those extra hoops - my misunderstanding <br>
    </p>
    <p>Again, thank you for the mods and your help; I think I'll be good
      for a while - at least I hope so :-)</p>
    <p>Arnold<br>
    </p>
    <br>
  </body>
</html>

--------------588B1319AFFBA85EE831902A--


--===============3058632717983070451==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============3058632717983070451==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Graphicsmagick-apis mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-apis

--===============3058632717983070451==--