use of virtual methods with user classes allocated with pfMalloc

New Message Reply Date view Thread view Subject view Author view

Dwight Meglan (dwight++at++ht.com)
Sat, 3 Feb 1996 15:54:49 -0400


I have created a class hierarchy that has virtual methods and am using
pfMalloc to create instances of these. Whenever I call one of the virtual
methods, I get core dump at the entry to the method. I do not make it into
the method near as I can tell. When I look at the class contents, it is
properly defined (its data that is), but the __vptr is NILL. My guess is
that the virtual methods are not being handled properly somehow. I've
successfully created a number of hierarchies that have no virtual methods
that use pfMalloc so all I can figure is that it is the virtual method that
is getting me.

Another curiosty is that I put printf's in the default constructors of
these classes and nothing ever prints out, but the instances of the classes
come into existence with the default values of the data members as set in
my default constructor.

Pointers on how I can create classes with virtual methods that I can
pfMalloc into the shared arena would be greatly appreciated.

Thanks,
--dwight

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dwight Meglan, PhD | Developers of complete surgery simulation
Engineering Coordinator | training systems and surgery simulation
High Techsplanations, Inc. | creation software tools
6001 Montrose Rd., Suite 902 |
Rockville, MD 20852-4874 | "Witty, yet erudite saying goes here..."
301 984 3706 x38 |
301 984 2104 : FAX |
dwight++at++ht.com | http://www.ht.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:21 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.