That's pretty cool!
I have 1 question though, I notice you never free() memory in this example. So to prevent leaks, would you have to free() each attribute individually or would just freeing **data in the destructor suffice?
In any case, thanks for sharing.
Spikey wrote:That's pretty cool!
I have 1 question though, I notice you never free() memory in this example. So to prevent leaks, would you have to free() each attribute individually or would just freeing **data in the destructor suffice?
In any case, thanks for sharing.
yeah you would have to free some stuff. im not sure exactly now. so i dont wanna tell you the wrong thing. let me do some research and get back to you.
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
Spikey wrote:So to prevent leaks, would you have to free() each attribute individually or would just freeing **data in the destructor suffice?.
You would have to free each item in data, then free data.
The novice realizes that the difference between code and data is trivial. The expert realizes that all code is data. And the true master realizes that all data is code.