Skip to content

Instantly share code, notes, and snippets.

@zougloub
Created June 5, 2018 03:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zougloub/a6462b72c0b548b291d7e5c4c2d0846a to your computer and use it in GitHub Desktop.
Save zougloub/a6462b72c0b548b291d7e5c4c2d0846a to your computer and use it in GitHub Desktop.
When you have too many warnings in a piece of code and then track down a corruption issue...
#include <cstdio>
class C {
public:
C() {
printf("%s this=%p\n", __func__, this);
}
~C() {
printf("%s this=%p\n", __func__, this);
}
};
C nasty()
{
// FTW
}
int main() {
nasty();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment