Valgrind Error: in use at exit: 72,704 bytes C++ Initialization List weirdness with char*
Issue: I have a weird issue that I wasn't expecting. I have a class called Answers and within the header is this: class Answer { char* aText; bool b_correct; public: Answer():aText(0){;} //default constructor } The main (testing) driver code is this: int main(void) { static const unsigned int MAX_ANSWERS = 5; Answer answers[MAX_ANSWERS]; } The (unexpected) weirdness I am getting is that there is an alloc happening, and I haven't used a new anywhere in my code yet. I'm guessing that the char* is calling this in the initialization list. I am using valgrind to test my code, and I'm getting 11