this is the final version of the priority queue i implemented {with some of your help!}...
the problem is that when i profile the code with valgrind, it shows that i have a memory leak....
i can also see that, if in my code i make certain test_points{where i pause the execution} and then check out the process manager....It seems that although i clean the memory, something stays behind...
i've used simple segregated storage scheme that vijayan121 suggested.. i also have a version where i visit every node to deleting it... using a preorder tree walk, or the method Hamrick suggested {with a stack}
all versions, have the exact same problem, that tells me that memory leak is not in the structure .....but where else can it be??
I attach the version with the segregated scheme along with the makefile i used to test the structure with valgrind
thank you in advance for your time...