bugfastcgi++ - Bugs: bug #34384, Warning: class 'Request' has...

 
 
Show feedback again

bug #34384: Warning: class 'Request' has virtual functions but non-virtual destructor

Submitted by:  David Schneider <davidschneider>
Submitted on:  Mon 26 Sep 2011 12:22:26 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: Eddie Carle <eddic>
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 27 Sep 2011 04:28:36 PM UTC, comment #3:

Yeah, the issue is that by defining a virtual destructor, the vtable for the Request class will be enlarged. I know it is really a trivial memory usage compared to everything else but it is more a question of how much are we willing to sacrifice performance wise just to shut up compiler warning messages.

For example. My compiler complains about not using the return value from read()/write() in the wakeup system. Should we define a variable and store the return value just to shut it up even though we don't actually need it?

Eddie Carle <eddic>
Project AdministratorIn charge of this item.
Tue 27 Sep 2011 03:03:39 PM UTC, comment #2:

I don't think its necessary, but my compiler complains about it:
warning: ‘class Request’ has virtual functions but non-virtual destructor

The empty, virtual destructor is only to satisfy the compiler.

David Schneider <davidschneider>
Mon 26 Sep 2011 09:02:28 PM UTC, comment #1:

I'm not sure this is necessary. The Request classes are never destroyed virtually. They are really only ever destroyed via the Manager which also builds them.

Would you agree?

Eddie Carle <eddic>
Project AdministratorIn charge of this item.
Mon 26 Sep 2011 12:22:26 PM UTC, original submission:

g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51) complains about missing virtual destructor if there are virtual methods.

Fix: Add a virtual destructor to the Request class

David Schneider <davidschneider>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by eddic (Posted a comment)
  • -unavailable- added by davidschneider (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 26 Sep 2011 09:02:28 PM UTCeddicAssigned toNone=>eddic
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup