Skip to content

Instantly share code, notes, and snippets.

@bannus
Created November 1, 2012 01:46
Show Gist options
  • Save bannus/3991099 to your computer and use it in GitHub Desktop.
Save bannus/3991099 to your computer and use it in GitHub Desktop.
bool unload(void)
{
// must iterate through each list and free every variable
for (int i = 0; i <= 25; i++)
{
node* williamwallace = table[i]->next;
node* sword = table[i];
while (sword != NULL)
{
free(sword);
// avenging sword follows leadership of William Wallace, frees pointers
sword = williamwallace;
// William Wallace does not advance into NULL space
if (williamwallace != NULL)
{
williamwallace = williamwallace->next;
}
}
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment