Leaking Message Handle

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Leaking Message Handle

  • Creator
    Topic
  • #49550
    garry r fisher
    Participant

    Hi,

    Can anybody spot why I’m getting a leaking message handle in the following code?

    # Composite multisegment transactions

    #

    proc baseJoinTrans { args } {

     

      global omsg

      set dispList {}

      keylget args MODE mode                   ;# Get cloverleaf mode        

      if {[string equal $mode start]} {

          # Perform special init functions

          set omsg “”

          othSlotInit EPISODES 999999

      }

      if {[keylget args MSGID mh] == 1} {

         lappend dispList “KILL $mh”                  

         set message [msgget $mh]                ;# All of message

         set nlsEnd [msgget $mh 9 3]            ;# NLS or END

         set omsg $omsg$message

         

         if {[string equal $nlsEnd END]} {  

            set newmsg [msgcopy $mh]

            msgset $newmsg $omsg

            lappend dispList “CONTINUE $newmsg”

            set omsg “”

         }            

      }

      return $dispList

    }

    I’ve disposed of both message handles (I think) but I’m still getting a leak.

    Regards

    Garry

Viewing 1 reply thread
  • Author
    Replies
    • #62453
      garry r fisher
      Participant

      Found it – No leak. Just not failing cleanly following some testing.

      Would anybody use ‘catch’ on thier TPS’?

      Regards

      Garry

    • #62454
      Dennis Pfeifer
      Participant

      All the time .. catch the error and handle it ..

      Dennis

Viewing 1 reply thread
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,432
Topic Tags
286
Empty Topic Tags
10