title: How to know if a pointer points to the heap or the stack?
body: <p>Example:</p>
  
  <pre><code>bool isHeapPtr(void* ptr)
  {
       //...
  }
  
  int iStack = 35;
  int *ptrStack = &amp;iStack;
  bool isHeapPointer1 = isHeapPtr(ptrStack); // Should be false
  bool isHeapPointer2 = isHeapPtr(new int(5)); // Should be true
  /* I know... it is a memory leak */
  </code></pre>
  
  <h2>Why, I want to know this:</h2>
  
  <p>If I have in a class a member-pointer and I don't know if the pointing object is new-allocated. Then I should use such a utility to know if I have to <code>delete</code> the pointer.</p>
  
  <p><strong>But:</strong><br>
  My design isn't made yet. So, I will program it that way I always have to <code>delete</code> it. I'm going to avoid rubbish programming</p>