The difference between tsubobjectptr and traditional C + + pointers

Source: Internet
Author: User

Transferred from: http://aigo.iteye.com/blog/2282142

There are the following differences (prerequisites for 1 and 2: The class that the pointer resides in must be a subclass of Uobjcct ):

The 1,tsubobjectptr pointer is a smart pointer to the UE4 API for traditional C + + pointers (Native C + + Pointer).

When the object pointed to by the pointer is destroy, TSUBOBJECTPTR is automatically zeroed, and the traditional C + + pointer requires you to manually place null.

2, if tsubobjectptr plus UE4 template symbol:uproperty (), then the pointer can be exposed to the UE4 editor operation, while the C + + traditional pointer is not available.

Reference:

Https://answers.unrealengine.com/questions/60581/tsubobjectptr-vs-uboxcomponent.html

The difference between tsubobjectptr and traditional C + + pointers

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.