Comments (5)
Dear Barak,
Thank you for your comment. You are right. I forgot to add the table deletion API function. Here is my answers:
- It seems OK although I cannot find the definitions of the followings:
deletep()
: Maybe the same asbool (*delete)(rtTable* p, u8* pDest, int plen)
in the original?vector rEnts
: Maybestd::vector<routeEnt*> rEnts
?
- Yes, I will add two API functions. One is
rtArtFlushRoutes(rtTable *pt)
. This function will delete all the routes in*pt
. The other isrtArtDeleteTable(rtTable *pt)
. This function will callrtArtFlushRoutes()
, then deallocate all memories inside*pt
, then free `pt' itself (just like your code does in the last part of the wrapper.) It will be written in C.
Cordially yours,
Yoichi
from art.
- yes - we renamed delete with deletep for C++ compatibility. yes -
vector is std::vector - we had to use a vector since its not possible to
delete the entries while performing a walk. - This will be great. You will probably not need a vector as the Flush
will take care of it.
Thank you!
------ Original Message ------
From: "Yoichi Hariguchi" [email protected]
To: "hariguchi/art" [email protected]
Cc: "bakinat" [email protected]; "Author"
[email protected]
Sent: 17/08/2016 22:50:09
Subject: Re: [hariguchi/art] There is no API to delete the routing table
and free its memory (#2)
Dear Barak,
Thank you for your comment. You are right. I forgot to add the table
deletion API function. Here is my answers:It seems OK although I cannot find the definitions of the followings:
deletep(): Maybe the same as "bool (delete)(rtTable p, u8* pDest, int
plen)" in the original?vector rEnts: Maybe "std::vector rEnts"?Yes, I
will add two API functions. One is "rtArtFlushRoutes(rtTable pt)." This
function will delete all the routes inpt.' The other is "rtArtDeleteTable(rtTable pt)." This function will call rtArtFlushRoutes()', then deallocate all memories insidept', then free
pt' itsel (just like your code does in the last part of the wrapper.)
It will be written in C.
Cordially yours,
Yoichi—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
from art.
Hi Barak,
I implemented:
- Flush Routes: which deletes all the route entries
- Delete Routing Table: which deletes all the rout entries, then delete the table itself and free its memory.
Please check README and the source code.
from art.
Thank you very much!
So far from my testing it looks good!
from art.
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.
from art.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from art.