[ndnSIM] Custom Strategy - destructor is called 4 times?

Junxiao Shi shijunxiao at email.arizona.edu
Wed Mar 15 17:27:50 PDT 2017


Hi John

As stated in NFD Developer Guide, the forwarding strategy should be
stateless, and all states should be stored as StrategyInfo into PIT entries
and measurements entries. A stateless object is cheap to construct and
copy. Thus, there's nothing to worry about when multiple instances of a
nfd::fw::Strategy subclass are constructed and destructed.

Yours, Junxiao

On Sun, Mar 12, 2017 at 9:23 PM, John Baugh <jpbaugh at umich.edu> wrote:

> I implemented a custom Strategy, called PStrat, and wrote a destructor.
> Inside of this method, I wrote a simple cout statement to indicate it was
> being called.
>
> Now, I'm getting it called 4 times it seems.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170315/11b162aa/attachment-0001.html>


More information about the ndnSIM mailing list