Log4cxx
  1. Log4cxx
  2. LOGCXX-160

helpers/object.h: DECLARE_LOG4CXX_OBJECT macro definition is missing virtual destructor declaration

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.9.7, 0.10.0
    • Fix Version/s: 0.10.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      log4cxx 0.9.7 on Linux

      Description

      Hi,
      the macro DECLARE_LOG4CXX_OBJECT declares a new class with a virtual function, but doesn't declare a virtual destructor. gcc 3.2.3 complains this...

      The following is the new macro definition fixing the bug (for the code in CVS head):
      #define DECLARE_LOG4CXX_OBJECT(object)\
      public:\
      class Class##object : public helpers::Class\
      {\
      public:\
      Class##object() : helpers::Class() {}\
      virtual ~Class##object() {}\
      virtual const log4cxx::logchar* getName() const

      { return LOG4CXX_STR(#object); }

      \
      virtual helpers::ObjectPtr newInstance() const\

      {\ return new object();\ }

      \
      };\

      The DECLARE_ABSTRACT_LOG4CXX_OBJECT macro has the same problem, but only in CVS head, not in 0.9.7.

        Activity

        Hide
        Curt Arnold added a comment -

        Committed rev 494324.

        Show
        Curt Arnold added a comment - Committed rev 494324.

          People

          • Assignee:
            Curt Arnold
            Reporter:
            Marc-Oliver Straub
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development