Loading ...
Sorry, an error occurred while loading the content.

Dynamic creation/deletion of the TMailMessage2000

Expand Messages
  • wolandms@inbox.ru
    Hi all, First, thanks to Marcello for the nice set of components. Especially I m interested in TMailMessage2000. I tried to use it in my program. Everything
    Message 1 of 5 , Nov 19, 2001
    • 0 Attachment
      Hi all,

      First, thanks to Marcello for the nice set of components.
      Especially I'm interested in TMailMessage2000. I tried to use it in
      my program. Everything seems to work but one thing: when I try to
      DYNAMICALLY create the component, it is ok, I can work with it, but
      when I free it - there's lots of recursive calls which quickly create
      stack overflow and thus an access violation. Does anyone use it in
      dynamic mode?

      Thanks beforehands!
    • wolandms@inbox.ru
      Hello all, By the way, the fix was simple. But because it looks like no one is interested in it, I don t see the reason to post it here... Best regards,
      Message 2 of 5 , Nov 22, 2001
      • 0 Attachment
        Hello all,

        By the way, the fix was simple. But because it looks like no one is
        interested in it, I don't see the reason to post it here...

        Best regards,

        Wolandms
      • Marcello
        Hi Mr, I use my components dynamically because they are on threads, some applications create and destroy it thousands of times in a daily basis, and I never
        Message 3 of 5 , Nov 27, 2001
        • 0 Attachment
          Hi Mr,

          I use my components dynamically because they are on threads, some
          applications create and destroy it thousands of times in a daily basis,
          and I never got any problems freeing it. There are several recursive
          calls, but far from fulfilling the stack, and the process of disposing
          memory is the same in any case.
          Make sure you aren't instancing some objects too much by yourself.

          Regards,

          > Hi all,
          >
          > First, thanks to Marcello for the nice set of components.
          > Especially I'm interested in TMailMessage2000. I tried to use it in
          > my program. Everything seems to work but one thing: when I try to
          > DYNAMICALLY create the component, it is ok, I can work with it, but
          > when I free it - there's lots of recursive calls which quickly create
          >
          > stack overflow and thus an access violation. Does anyone use it in
          > dynamic mode?
          >
          > Thanks beforehands!
          >
          >
          >

          =====
          Marcello "Panda" Tavares
          mycelo@...
          http://mpanda.8m.com
          http://groups.yahoo.com/group/piadasdopanda
          http://groups.yahoo.com/group/tmail2000
          ICQ 5831833
          Sorocaba/SP BRAZIL

          _______________________________________________________________________________________________
          Yahoo! GeoCities
          Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo! GeoCities. É fácil e grátis!
          http://br.geocities.yahoo.com/
        • wolandms
          Hello there, Actually, try using it in a DLL that creates only one message at a time. What happens in my case is that FSubPartList in TMailPart contains the
          Message 4 of 5 , Dec 17, 2001
          • 0 Attachment
            Hello there,

            Actually, try using it in a DLL that creates only one message at a
            time. What happens in my case is that FSubPartList in TMailPart
            contains the owner of the message as well as subparts - thus creating
            endless recursion. Here's how I had to modify the destructor in order
            for things to work properly:

            destructor TMailPart.Destroy;
            var
            Loop: Integer;

            begin

            for Loop := 0 to FSubPartList.Count-1 do
            { this 'if' is added by me - this completely solved the problem in my
            case }
            if (FOwnerMessage <> FSubPartList.Items[Loop]) then
            FSubPartList.Items[Loop].Destroy;

            FHeader.Free;
            FBody.Free;
            FDecoded.Free;
            FSubPartList.Free;

            inherited Destroy;
            end;



            --- In tmail2000@y..., Marcello <mycelo@y...> wrote:
            > Hi Mr,
            >
            > I use my components dynamically because they are on threads, some
            > applications create and destroy it thousands of times in a daily
            basis,
            > and I never got any problems freeing it. There are several recursive
            > calls, but far from fulfilling the stack, and the process of
            disposing
            > memory is the same in any case.
            > Make sure you aren't instancing some objects too much by yourself.
            >
            > Regards,
            >
            > > Hi all,
            > >
            > > First, thanks to Marcello for the nice set of components.
            > > Especially I'm interested in TMailMessage2000. I tried to use it
            in
            > > my program. Everything seems to work but one thing: when I try to
            > > DYNAMICALLY create the component, it is ok, I can work with it,
            but
            > > when I free it - there's lots of recursive calls which quickly
            create
            > >
            > > stack overflow and thus an access violation. Does anyone use it
            in
            > > dynamic mode?
            > >
            > > Thanks beforehands!
            > >
            > >
            > >
            >
            > =====
            > Marcello "Panda" Tavares
            > mycelo@y...
            > http://mpanda.8m.com
            > http://groups.yahoo.com/group/piadasdopanda
            > http://groups.yahoo.com/group/tmail2000
            > ICQ 5831833
            > Sorocaba/SP BRAZIL
            >
            >
            ______________________________________________________________________
            _________________________
            > Yahoo! GeoCities
            > Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo!
            GeoCities. É fácil e grátis!
            > http://br.geocities.yahoo.com/
          • wolandms
            Hi again, I absolutely forgot to say: I compiled the code under Delphi 3 and after commenting everything but bits responsible for TMailMessage2000 only and
            Message 5 of 5 , Dec 17, 2001
            • 0 Attachment
              Hi again,

              I absolutely forgot to say: I compiled the code under Delphi 3 and
              after commenting everything but bits responsible for TMailMessage2000
              only and commenting some cosmetic things (like parameters by default).

              Delphi 3 was a requirenment.
              Anyway, despite TMailMessage2000 looks really nice, I use Internet
              Messaging Suite now (I believe I interpreted IMS correctly), where I
              added HTML, RTF and TNEF support.



              --- In tmail2000@y..., "wolandms" <wolandms@i...> wrote:
              > Hello there,
              >
              > Actually, try using it in a DLL that creates only one message at
              a
              > time. What happens in my case is that FSubPartList in TMailPart
              > contains the owner of the message as well as subparts - thus
              creating
              > endless recursion. Here's how I had to modify the destructor in
              order
              > for things to work properly:
              >
              > destructor TMailPart.Destroy;
              > var
              > Loop: Integer;
              >
              > begin
              >
              > for Loop := 0 to FSubPartList.Count-1 do
              > { this 'if' is added by me - this completely solved the problem in
              my
              > case }
              > if (FOwnerMessage <> FSubPartList.Items[Loop]) then
              > FSubPartList.Items[Loop].Destroy;
              >
              > FHeader.Free;
              > FBody.Free;
              > FDecoded.Free;
              > FSubPartList.Free;
              >
              > inherited Destroy;
              > end;

              Best regards,
              Wolandms
            Your message has been successfully submitted and would be delivered to recipients shortly.