I am working with dynamically loading parsers from an external source, 
and I can see that I will need to be able to unload parsers - ie. to 
free up the memory used by that parser.

Looking into the STAF source, I can see that a parser (of type 
STAFCommandParserPtr) stores a pointer to the STAFCommandParser in a 
member called fPtr, and it would seem that the * operator has been 
overloaded (in the STAFRefPtr template) to return this pointer. But 
that would collide with my intentions, I think, since the natural way 
to go about making a dynamically loadable parser would be something like:

STAFCommandParserPtr *aparser=new STAFCommandParserPtr(...);
...
delete aparser;

Is there a way to get around this? Can I use a *STAFCommandParser 
instead? I suspect not, since the STAF functions expect 
STAFCommandParserPtr. What is the best way?

------------------------------------------------------------------------------
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.  
But none more important than the need to reduce IT complexity 
while improving strategic productivity.  Learn More! 
http://www.accelacomm.com/jaw/sdnl/114/51507609/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to