<OBJECT> Vs. CreateObject ?

Results 1 to 2 of 2

Thread: <OBJECT> Vs. CreateObject ?

  1. #1
    Richard Lissimore Guest

    Default <OBJECT> Vs. CreateObject ?

    Hi all,<BR><BR>I&#039ve read quite a few articles on different sites all stating the advantages of &#060;OBJECT&#062; over CreateObject.<BR><BR>BUT I (and other speed freaks) would like to know...<BR><BR>Does the &#060;OBJECT&#062; created object permanently stay in memory until the user&#039s session ends? Unlike CreateObject where you explicitly flush it from memory, or can you flush it aswell?<BR><BR>Can you create an Application level single instance of an &#060;OBJECT&#062; created object that acts the same for all accesses for all users?<BR><BR>Thanks for any answers!<BR><BR>

  2. #2
    Ken Purcell Guest

    Default RE: <OBJECT> Vs. CreateObject ?

    A server side include file containing an instance to an object<BR>such as Set fso = Server.CreateObject("Scripting.FileSystemObject") can be used just as a global asa<BR>but remember to set it to nothing on each page you are referencing it. An excellent dissertation on this subject can be found in the wrox book "Beginning Components for ASP" Incidentally, In both ways (Server.CreateObject and &#060;OBJECT&#062;) of declaring an instance of an object The same rule applies..<BR>If an ASP Page is not transactional, then the lifetime of the object is equal to the duration of one method being called from an asp page to that object Otherwise if an ASP Page is transactional then the lifetime duration of all objects on the page is equal to the time to render the page..

Posting Permissions

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