Difference between //< and //-> when declaring a class member

Some times I have seen members of a REST class that are stored in ROOT

  • using //<
  • and sometimes using //->.

Is there any difference by using one or the other?

I think //< mark is trivial. It has no function at all.

//-> means that this datamember is a pointer, and the class needs to save the content of the pointed data. Otherwise it will only save the address, which could cause memory leak.

The reference is here
https://root.cern.ch/root/htmldoc/guides/users-guide/ROOTUsersGuide.html#streamers

1 Like