• Content count

  • Joined

  • Last visited

Community Reputation

130 Neutral

About Qanael

  • Rank
  1. bitvectors?

    Whenever you need to encode a large number of boolean flags, especially for transmission over a network, you can pack them into a bitvector instead and save the wasted space from bools (which are one byte at the smallest). This is useful for things like player or enemy objects, which might have a very large amount of flags to transmit.
  2. This is an interesting problem with static variables. Since you call CrtDumpMemoryLeaks() before main() exits, static variables which allocate memory (which get destructed after main() exits) will still show as memory leaks. To avoid this false positive, don't call CrtDumpMemoryLeaks() manually. The _CRTDBG_LEAK_CHECK_DF flag effectively adds the memory leak dump as an atexit() call, which happens at the very end of the program.