title: Test to see if I should free memory or not
body: <p>I am passing a pointer to a char array to my method, as well as a value for the actual height of the char array. I am looping through to see if all values are 0, if they are then return 0, else return 1.</p>
  
  <p>The method is used as a test to see if I should free memory or not and set the pointer to null if it is full of 0's. The issue i am having is that the program should have "some unfree" memory at the end, so I have no idea whether or not its doing it correctly - and gdb I struggle with immensely.</p>
  
  <p>Thanks for reading</p>
  
  <pre><code>int shouldBeNull(char *charPointer, int sizeOfCharArray)
  {
      int isIn = 0;
      int i = 0;
  
      while(i &lt; sizeOfCharArray){
          if(*charPointer != '0'){
              isIn = 1;
              break;
          }
          i++;
          charPointer++;
      }   
      return isIn;     
  }
  </code></pre>