DoDispose missing from certain classes.

13 views
Skip to first unread message

man...@gmail.com

unread,
Apr 26, 2025, 4:53:16 PMApr 26
to 5G-LENA-users
I noticed that in many classes proper clean up does not happen, such as
`nr-mac-scheduler-ns3.cc/.h' where `Ptr<Object>` have to be set to `nullptr` and various collections have to be cleared. This causes Valgrind to crash.
Is there a reason why?

Tom Henderson

unread,
Apr 27, 2025, 11:59:45 AMApr 27
to man...@gmail.com, 5G-LENA-users

Usually it is because the author did not test with valgrind (or the repository itself is not being tested with valgrind).  These kind of warnings cause a noisy valgrind output but are usually not consequential because the simulation process is in the midst of closing.  It becomes more important when such objects are being deleted in the middle of a simulation, because it can cause a memory leak.  However, it is good practice to clean these up and remove reference cycles so I'd suggest to submit patches where you find these missing implementations of DoDispose().

- Tom

--
You received this message because you are subscribed to the Google Groups "5G-LENA-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 5g-lena-user...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/5g-lena-users/39b13d07-3476-4457-81ad-64228b9a9b2cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages