title: Theory on C++ convention regarding cleanup of the heap, a suggested build, is it good practice?
body: <p>I have another theory question , as the title suggested it's to evaluate a build of code. Basically I'm considering using this template everywhere.</p>
  
  <p>I am using VC++ VS2008 (all included)</p>
  
  <blockquote>
    <p>Stapel.h</p>
  </blockquote>
  
  <pre><code>class Stapel
  {
  public:
      //local vars
      int x;
  
  private:
  public:
      Stapel();
      Stapel(int value);
      ~Stapel(){}
  
      //getters setters
      void set_x(int value)
      {
          x = value;
      }
  
      int get_x(int value)
      {   
          x = value;
      }   
  
  void CleanUp();
  
  private:
  };
  </code></pre>
  
  <blockquote>
    <p>Stapel.cpp</p>
  </blockquote>
  
  <pre><code>#include "Stapel.h"
  
  Stapel::Stapel()
  {
  
  }
  
  Stapel::Stapel(int value)
  {
      set_x(value);
  }
  
  void Stapel::CleanUp()
  {
      //CleanUpCalls
  }
  </code></pre>
  
  <p>The focal point here is the cleanup method, basically I want to put that method in all my files everywhere , and simply let it do my delete calls when needed to make sure it's all in one place and I can prevent delete's from flying around which , as a rookie, even I know is probably not something you want to mess around with nor have a sloppy heap.</p>
  
  <p>What about this build?</p>
  
  <p>Good bad ? why ?</p>
  
  <p>And what about using destructors for such tasks?</p>