Created
November 1, 2012 01:46
-
-
Save bannus/3991099 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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