Results 1 to 2 of 2

Thread: class inheriting

  1. #1

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729

    class inheriting

    i have a program that has ClassD that inherits from classC that inherits from classB that inherits from classA..when i use classA it will be slower than a non-inheriting exactly the same class just because it is inheriting from another class that is inheriting too and that way? or not?
    \m/\m/

  2. #2
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    I don't think that speed would be an issue unless you are inheriting lots of methods, etc. that you wouldn't even use - but that goes against the principles of inheritance anyway.

    In your example, ClassA is the root of your inheritance structure, so ClassA that is inherited from, and a ClassA that is not inherited from should have the same performance.

    For your other classes that do inherit from other classes, again - I don't think that speed would be that much of an issue, and I would think that the benefit of code reuse would be of more value.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width