• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to keep the variable by value?  RSS feed

 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dodgedLoc should not be changing.
But for the backup path, there will be something added to it every now and again.
How to avoid dodgedLoc to change when the backup path is changed also.
The container is by reference, how can I just make a copy of it?
Thanks
Jack

 
Stephan van Hulst
Saloon Keeper
Posts: 7993
143
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dodgedLoc won't change, because it doesn't contain references to backups. It will only change if individual nodes change. you should make sure that the nodes are immutable, or that you copy the nodes.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!