?
Solved

RUNTIME_CLASS

Posted on 1998-11-02
2
Medium Priority
?
500 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
[X]
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
2 Comments
 
LVL 12

Accepted Solution

by:
migel earned 200 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

770 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