🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.web
2 messages
2 total messages Started by Mark Jacobs Thu, 09 Jun 2005 14:02
TWebModule creation and destruction
#1172
Author: Mark Jacobs
Date: Thu, 09 Jun 2005 14:02
30 lines
2013 bytes
I have read that TWebModule does not unload its DLL between requests unless

Application->CacheConnections=false;

is set. Does that mean that my WebModuleDestroy event won't be called after 
each request unless I set Application->CacheConnections=false; ?

//---------------------------------------------------------------------------
void __fastcall TWebModule1::WebModuleDestroy(TObject *Sender)
{
   mjclosedb(AdsTable1,AdsConnection1); mjclosedb(AdsTable3,AdsConnection3);
   delete fldlist; delete idxlist; if (cpd1) { delete cpd1; cpd1=NULL;}
}

In my constructor, I have :-

//---------------------------------------------------------------------------
__fastcall TWebModule1::TWebModule1(TComponent* Owner)
	: TWebModule(Owner)
{
   fldlist=new TStringList(); idxlist=new TStringList();
   rtpth=ExtractFilePath(ParamStr(0)); 
rtpth=ExtractFilePath(ParseFileDesc(rtpth+"..\\Surveys\\"));
   ForceDirectories(rtpth);
}

Where should I be closing my databases? Wehre should I be opening them? TIA,
-- 
Mark Jacobs
http://www.dkcomputing.co.uk
Re: TWebModule creation and destruction
#1175
Author: Mark Jacobs
Date: Mon, 13 Jun 2005 10:08
8 lines
1299 bytes
Bump, bump... (cannot find anything on the web about this)

I am looking for the most efficient way of using TWebModules where the app is 
being loaded and run for each form submission - I need to tune down how long 
it is taking between form submissions. TIA,
-- 
Mark Jacobs
http://www.dkcomputing.co.uk
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads