-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There is no API to delete the routing table and free its memory #2
Comments
Dear Barak, Thank you for your comment. You are right. I forgot to add the table deletion API function. Here is my answers:
Cordially yours, |
------ Original Message ------
|
Hi Barak, I implemented:
Please check README and the source code. |
Thank you very much! |
My pleasure. Unfortunately, this version iterates the trie twice (like your implementation.) The first iteration collects all the routes; the second iteration deletes them. I tried to make a single iteration version, but it is challenging due to lack of back pointers between nodes. I think it is OK since flushing will not happen that often. |
Hi,
Thanks for this great piece of SW.
One issue we found was that there is no API to delete/free the table.
We wrote the following C++ wrapper to do the deletion/free.
It first traverse the tree and collects all entries into a vector. Then it deletes each vector element from the table. Finally, it deletes the default entry and the root elements.
Note that mTable is a pointer to rtTable.
Two questions:
Thanks,
Barak
IpArtWrapper::~IpArtWrapper()
{
vector<routeEnt*> rEnts;
}
The text was updated successfully, but these errors were encountered: