Is it a good practice to always use smart pointers?

后端 未结 10 2038
眼角桃花
眼角桃花 2020-12-04 05:08

I find smart pointers to be a lot more comfortable than raw pointers. So is it a good idea to always use smart pointers? ( Please note that I am from Java b

10条回答
  •  日久生厌
    2020-12-04 05:53

    In general, no you cannot use smart pointers always. For example, when you use other frameworks that don't use smart pointer (like Qt), you have to use raw pointers too.

提交回复
热议问题