473,322 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Change destructor qualifier

I swear, this godforsaken __fastcall qualifier that Borland came up
with is going to drive me insane! All I want is to subclass from a
class A with a destructor declared

virtual __fastcall ~A();

Is there any way for a subclass of A to have a destructor that ISN'T
__fastcall qualified? I cannot believe how lame this __fastcall crap
is...

--
Christopher[ Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Jul 22 '05 #1
7 1463
Christopher Benson-Manica wrote:
I swear, this godforsaken __fastcall qualifier that Borland came up
with is going to drive me insane! All I want is to subclass from a
class A with a destructor declared

virtual __fastcall ~A();

Is there any way for a subclass of A to have a destructor that ISN'T
__fastcall qualified? I cannot believe how lame this __fastcall crap
is...


From my experience with Borland, one it places a __fastcall
on a destructor (including a virtual one), it sticks.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

Jul 22 '05 #2

"Christopher Benson-Manica" <at***@nospam.cyberspace.org> wrote in message
news:c1**********@chessie.cirr.com...
I swear, this godforsaken __fastcall qualifier that Borland came up
with is going to drive me insane! All I want is to subclass from a
class A with a destructor declared

virtual __fastcall ~A();

Is there any way for a subclass of A to have a destructor that ISN'T
__fastcall qualified? I cannot believe how lame this __fastcall crap
is...


If A is your base class, lose the __fastcall. If A is derived from
a VCL class the dtor is declared with virtual __fastcall and so the
derived class will inherit it (the ctor is also virtual __fastcall). You're
only forced to use __fastcall with classes derived from Delphi classes.
Jul 22 '05 #3
Duane <spoo@zowie_flarn.com> spoke thus:
If A is your base class, lose the __fastcall.


It's a base class I can't change, because my boss wrote it. Oh well.

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Jul 22 '05 #4
Thomas Matthews <Th****************************@sbcglobal.net> spoke thus:
From my experience with Borland, one it places a __fastcall
on a destructor (including a virtual one), it sticks.


Well, that's certainly unfortunate behavior. *gnashes teeth* Guess
my plans are kaput...

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Jul 22 '05 #5

"Christopher Benson-Manica" <at***@nospam.cyberspace.org> wrote in message
news:c1**********@chessie.cirr.com...
Duane <spoo@zowie_flarn.com> spoke thus:
If A is your base class, lose the __fastcall.


It's a base class I can't change, because my boss wrote it. Oh well.


In my experience with BCB it is important to keep the GUI code separate
from the non GUI code (a good idea in any case). I wouldn't write code
that wasn't derived from VCL with any VCL extensions. Now that
BCB is at end of life, this is particularly a bad idea.

There's been some traffic on the newsgroups (check mers.com)
about using __fastcall and efficiency.
Jul 22 '05 #6
>
From my experience with Borland, one it places a __fastcall
on a destructor (including a virtual one), it sticks.


With Borland, most of the VCL is derived from a couple of base classes.
Both the ctor and dtor are virtual and __fastcall. Any derived class cannot change this.
If you write non GUI straight C++ classes, you can do whatever you like.
The OP's base class is probably written using __fastcall. If it's not
derived from a VCL class, it shouldn't be. If it is, there's not much
he can do.
Jul 22 '05 #7
In message <mz*********************@news20.bellglobal.com>, Duane
<spoo@zowie_flarn.com> writes

"Christopher Benson-Manica" <at***@nospam.cyberspace.org> wrote in message
news:c1**********@chessie.cirr.com...
Duane <spoo@zowie_flarn.com> spoke thus:
> If A is your base class, lose the __fastcall.
It's a base class I can't change, because my boss wrote it. Oh well.


In my experience with BCB it is important to keep the GUI code separate
from the non GUI code (a good idea in any case). I wouldn't write code
that wasn't derived from VCL with any VCL extensions. Now that
BCB is at end of life,


???
this is particularly a bad idea.

There's been some traffic on the newsgroups (check mers.com)
about using __fastcall and efficiency.


--
Richard Herring
Jul 22 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Stub | last post by:
Please answer my questions below - thanks! 1. Why "Derived constructor" is called but "Derived destructor" not in Case 1 since object B is new'ed from Derived class? 2. Why "Derived destructor"...
4
by: Mahesh Tomar | last post by:
Dear Readers, I am porting my existing C code to C++. In my existing code there are numerous functions that has been defined with CONST qualifier. For eg. foo(const DATA_TYPE *x); DATA_TYPE is...
11
by: Ken Durden | last post by:
I am in search of a comprehensive methodology of using these two object cleanup approaches to get rid of a number of bugs, unpleasantries, and cleanup-ordering issues we currently have in our...
7
by: Charles Sullivan | last post by:
On my system (using gcc) I found I need to use the "volatile" qualifier to limit compiler optimization. I notice that this qualifier is described in K&R 2nd edition (1988) but not in K&R 1st...
13
by: sonald | last post by:
Hi, Can anybody tell me how to change the text delimiter in FastCSV Parser ? By default the text delimiter is double quotes(") I want to change it to anything else... say a pipe (|).. can anyone...
23
by: Ben Voigt | last post by:
I have a POD type with a private destructor. There are a whole hierarchy of derived POD types, all meant to be freed using a public member function Destroy in the base class. I get warning C4624....
7
by: sam | last post by:
Hi, See when i reading a sourcecode of a program, I read that the constructor is ordinary and after that the programmer has written virtual destructor for that constructor . Why we use the...
4
by: Ben Petering | last post by:
Hi group, this is a 'best practice' type question (I want discussion of the issue - whys and why nots - similar to "casting the return value of malloc()", to cite an analogous case). Let's...
9
by: istillshine | last post by:
It seems I never need to use it. It only made a long line longer, and made you type five more characters. I feel so strange why people are talking about it.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.