Bugzilla – Bug 1293
Change inheritance for ns3::Chunk
Last modified: 2012-03-19 04:35:53 UTC
ns3::Chunk should be inherited from SimpleRef<Chunk,ObjectBase>. This will allow headers to be wrapped up in ns3::Ptr smart pointer, if necessary. The following patch does the thing: https://bitbucket.org/cawka/ns-3-dev/changeset/11d5ee4861e8
Unless you come up with an explanation of why you want to do this, no. The idea of allowing chunks be created on the heap is not bad per se, but doing as you suggest would not mesh very well with the current usage of chunks that are allocated on the stack. I would suggest that you use boost::shared_ptr if you need to do this.