Obsolete Members for QScopedPointer
QScopedPointer 클래스의 다음 멤버들은 더 이상 사용되지 않습니다. 이 멤버들은 기존 소스 코드가 계속 작동하도록 하기 위해 제공됩니다. 새로운 코드에서는 이 멤버들을 사용하지 않는 것을 강력히 권장합니다.
공개 함수
관련 비멤버
(deprecated in 6.2) void | swap(QScopedPointer<T, Cleanup> &lhs, QScopedPointer<T, Cleanup> &rhs) |
멤버 함수 문서
[noexcept, deprecated in 6.2] void QScopedPointer::swap(QScopedPointer<T, Cleanup> &other)
이 함수는 6.2 버전부터 사용이 권장되지 않습니다. 새로운 코드에서는 이 함수를 사용하지 않는 것이 좋습니다.
대신 ` std::unique_ptr `을 사용하십시오. 이 함수는 포인터가 해당 범위를 벗어나게 할 수 있습니다.
이 범위 내 포인터를 ` other`와 교환합니다. 이 작업은 매우 빠르며 절대 실패하지 않습니다.
[noexcept, deprecated in 6.1] T *QScopedPointer::take()
이 함수는 6.1 버전부터 더 이상 권장되지 않습니다. 새로운 코드에서는 이 함수를 사용하지 않는 것을 강력히 권장합니다.
대신 std::unique_ptr 및 release() 를 사용하십시오.
이 객체가 참조하는 포인터의 값을 반환합니다. 이 QScopedPointer 객체의 포인터는 nullptr 로 재설정됩니다.
이 함수를 호출하는 쪽이 포인터에 대한 소유권을 갖게 됩니다.
관련 비멤버 함수
[noexcept, deprecated in 6.2] void swap(QScopedPointer<T, Cleanup> &lhs, QScopedPointer<T, Cleanup> &rhs)
이 함수는 6.2 버전부터 더 이상 사용되지 않습니다. 새로운 코드에서는 이 함수를 사용하지 않는 것을 강력히 권장합니다.
대신 ` std::unique_ptr `를 사용하십시오. 이 함수는 포인터가 범위 밖으로 빠져나가는 문제를 일으킬 수 있습니다.
lhs 와 rhs 을 서로 바꿉니다.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.