-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Update the Object class engine details page. #11438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
b0984d7 to
4617315
Compare
|
|
||
| You should also never store ``RefCounted`` subclasses using raw pointers, for example | ||
| ``RefCounted *object = memnew(RefCounted)``. This is unsafe because other owners may destruct the object, leaving you | ||
| with a dangling pointer, which will eventually result in a crash. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit of repetition here with "will eventually result in a crash"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's in both sections, yes. But people may not read both.
Do you think we should rephrase one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a bit of a rephrase would be the best option
4617315 to
bb63b9c
Compare
| } | ||
| If the cast fails, ``nullptr`` is returned. This works the same as ``dynamic_cast``, but does not use | ||
| `C++ .RTTI <https://en.wikipedia.org/wiki/Run-time_type_information>`__. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot
| `C++ .RTTI <https://en.wikipedia.org/wiki/Run-time_type_information>`__. | |
| `C++ RTTI <https://en.wikipedia.org/wiki/Run-time_type_information>`__. |
| All objects in Godot have a :ref:`_notification <class_Object_private_method__notification>` | ||
| method that allows it to respond to engine level callbacks that may relate to it. | ||
| More information can be found on the :ref:`doc_godot_notifications` page. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| All objects in Godot have a :ref:`_notification <class_Object_private_method__notification>` | |
| method that allows it to respond to engine level callbacks that may relate to it. | |
| More information can be found on the :ref:`doc_godot_notifications` page. | |
| All objects in Godot have a :ref:`_notification <class_Object_private_method__notification>` | |
| method that allows it to respond to engine-level callbacks that may relate to it. | |
| More information can be found on the :ref:`doc_godot_notifications` page. |
This refreshes some outdated information, and adds a few missing bits and pieces:
GDREGISTER_CLASSinstead ofClassDB::register_class(which is no longer recommended)Object ownership and castingheading, where the different ownership models are explained.