Barracuda Application Server C/C++ Reference
NO
|
The name passed in as argument to a HttpDir/HttpPage object cannot be changed since the constructor only stores a pointer to the name. The virtual file system is designed to use as little memory as possible. Thus, the name passed in as argument to the HttpDir/HttpPage constructor is not copied; only the pointer reference is copied.
One would normally use constants as the name argument, but if you need to create a name dynamically, you can allocate space for the structure and the name as one piece as follows:
We use a HttpDir in the example above, but it also applies to a HttpPage, HttpResRdr, AuthenticateDir, EvDir or any class derived from HttpPage or HttpDir.