Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

RUNTIME_CLASS

Posted on 1998-11-02
2
488 Views
Last Modified: 2013-11-20
I derived CMyThread from CWinThread. Does RUNTIME_CLASS can create an object whose constructor has parameter? For example:
CMyThread : public CWinThread
{
 DECLARE_DYNAMIC(CMythread)
protected:
CMyThread(Object *);
~CMyThread();
}

Also, another question is that: when I use RUNTIME_CLASS to create ab object , does that mean I do not need to use "delete" to delete the object?

Thanks.
0
Comment
Question by:jonalee
2 Comments
 
LVL 12

Accepted Solution

by:
migel earned 100 total points
ID: 1324149
RUNTIME_CLASS not support creation of the objects with no default constructor (constructor without parameters). See declaration of the _IMPLEMENT_RUNTIMECLASS macro in the afx.h.
Creation objects with RUNTIME_CLASS uses new operator so you need to destroy created object manually.
0
 
LVL 1

Expert Comment

by:TheGrinch
ID: 1324150
RUNTIME_CLASS does not create objects. Read Help.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Question regarding Copy/Paste 16 96
fizzArray2 challenge 1 91
Detect file exist or not 3 179
unix example issues 18 98
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question