Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dll persistence and creation

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
I have a dll that is used to create random ads, record the impressions and also the click throughs...<br>
<br>
At the moment i am creating the object before i use it and then setting it to nothing when i have finished..<br>
<br>
I am worried that this isn't the most effective way of dealing with dlls with iis, as they don't seem to be released when i set them to nothing (the dll does not have a handle on any thing else which is open)<br>
<br>
any suggestions - should i create a session level instance? application instance? or keep doing what i am doing?
 
The general rule when dealing with COM objects from ASP is to do exactly what you're doing. A session level variable holding a reference to a COM object is a definite NO-NO.<br>
<br>
As to whether or not to create an application level reference, it depends on the threading model of the component. If it's 'both', an application level variable would probably be ok. If the component was created with VB, it's apartment threaded.<br>
<br>
Note that this is a very general answer, and should be taken only as a general guideline. You should look more into this issue, including using Microsoft Transaction Server.<br>
<br>
The best way to know if your object is actually getting released is to put some debugging code in the terminate event. You can write to a local log file, or use the NT event log.<br>
<br>
regards,<br>
-nick bulka
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top