# TFile gets same pointer for a different key version

**URL:** <https://root-forum.cern.ch/t/tfile-gets-same-pointer-for-a-different-key-version/43868>\
**Category:** ROOT\
**Created:** [March 8, 2021, 7:52am UTC](https://root-forum.cern.ch/t/tfile-gets-same-pointer-for-a-different-key-version/43868 "2021-03-08T07:52:30Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [March 8, 2021, 10:03am UTC](https://root-forum.cern.ch/t/tfile-gets-same-pointer-for-a-different-key-version/43868/3 "2021-03-08T10:03:30Z")

</div>

You seem to be misusing [the concept of the “namecycle”](https://root-forum.cern.ch/t/aux-1-aux-2-aux3/13345/2).  
When you create different trees, they should have different “names” (the “cycle” numbers are handled by the ROOT I/O automatically).

---

_[View the full topic](https://root-forum.cern.ch/t/tfile-gets-same-pointer-for-a-different-key-version/43868)._
