referencing a global object

Results 1 to 4 of 4

Thread: referencing a global object

  1. #1
    Join Date
    Dec 1969

    Default referencing a global object

    in asp, if you have all your business logic in a com object, can you spin off the object once, and then use it in all pages? <BR>right now, everytime we need the object, we create it on the page and then kill it at the end of the page. <BR>Is there any way around this?

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default NO...

    ..the way you are doing it is the RIGHT way<BR><BR>the only thing i would suggest is instead of killing it at the END of the page, kill it as soon as you are through with it.<BR><BR>

  3. #3
    Justin Bonaparte Guest

    Default RE: referencing a global object

    You could put the object into a session var, but that is a major no-no, performance and resource wise. I&#039;m currently playing God too (creating and destroying on the same page).

  4. #4
    Sandy Breon Guest

    Default I definitely that means

    that you should make your COM object(s) as light as possible so when it is recreated on every page there isn&#039;t a huge penalty. I do believe, however, that MTS is smart about the recreating and destroying the same objects over and over again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts