Is circular reference between objects a bad practice?

后端 未结 3 919
情歌与酒
情歌与酒 2021-02-18 13:27

I have a Model that will \"carry\" (Model.validator) a validator instance with it, and I need the Validator to have access to the Model\'s attributes. So, what I have come up wi

3条回答
  •  执念已碎
    2021-02-18 14:03

    There will not be any problems I'm sure. The most browsers' JS parsers can work with cycle dependecnies while garbage collecting. No more potential issues here.

提交回复
热议问题