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

Extra destructors

Expand Messages
  • fhew@canada.com
    I m just jumping on the learning curve for SOAP::Lite, and my first test application is throwing me for a conceptual loop.I thought, if my client app uses
    Message 1 of 1 , Jan 9, 2003
    • 0 Attachment
      I'm just jumping on the learning curve for SOAP::Lite, and my first test application
      is throwing me for a conceptual loop.

      I thought, if my client app uses SOAP to create a object on the server, that
      the object actually resides on the server (but it looks like it resides on the
      client.

      But when I actually implement the code (attached below) I see that the server's
      destructor is called auto-magically in the server right after the object was
      created.

      Since I've built in a object counter, it gets incremented on new() and decremented
      on DESTROY(). As a result, only calls to new() increment the counter.
      but there are a whole bunch of calls to DESTROY() so that the counter goes more
      negative on each occurance.

      ie create object count = 1
      magic destroy count = 0
      get attribute count = 0
      set attribute
      fall off end of program therefore destroy count = -1

      I guess I'm not too sure whats happening, only that I'm pretty sure its not
      what I want. Any insight as to why this happens, and how to get what I think
      I want? Keep in mind the issue is not the counter, but the apparent object
      destruction. The counter is just the visual side effect.

      TIA

      Fulko

      __________________________________________________________
      Get your FREE personalized e-mail at http://www.canada.com
    Your message has been successfully submitted and would be delivered to recipients shortly.