Hi need some help

Help
2004-02-23
2004-02-24
  • Mercyful Fate

    Mercyful Fate - 2004-02-23

    I'm trying Smapi in my telnet server, and i got a message reader working..  But when 2 nodes read messages at the same time.. And one node exits.. and calls MsgCloseApi();  to get back the memory.. when the second Node or thread goes to read the next message it crash's..  If i don't call MsgCloseApi(); then it doesn't crash .. but then i have a huge memory leak.. is there anyway to do sharing??

    Thanks much

     
    • Stas Degteff

      Stas Degteff - 2004-02-23

      Please use each smapi copy in different process because smapi is not thread-safe.

       
    • Mercyful Fate

      Mercyful Fate - 2004-02-24

      Yep i have my smapi reader routienes in a class.. and i run this in seperate instances...

       
      • Stas Degteff

        Stas Degteff - 2004-02-24

        >i have my smapi reader routienes in a class..

        Object-oriented Porgramming? SMAPI has written using "clean" C, not C++. And all routines uses common global variables.

        >and i run this in seperate instances...

        What's "instance"? It's copy of the class? Or it's copy of the program?
        SMAPI can't run two or more copies in one process. If you wants run two copy of the SMAPI then you should be run two copy of the program.

         

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks