Quote: "Is "XDiff" value must be "0.0" not "0" because it's "float" ..?"
It's not necessary to write out the decimal part if it is zero anyway. Conversion from integer to float is automatic.
Quote: "Why you used "-" operator before each variables ..?"
Because the way I calculated the angle of the mouse cursor relative to the center of the display, the mouse rotation is clockwise. But if you rotate an object around the Z axis, it will turn counter-clockwise, so if I don't use negative, then the tip of the cone will look in the opposite direction.
If you reverse the deductions, then the negative is not needed. This will work as well:
XDiff = dbScreenWidth() / 2 - dbMouseX();
YDiff = dbScreenHeight() / 2 - dbMouseY();
AngleZ = dbAtanFull(XDiff, YDiff);
Quote: "Is this enough to empty memory from my data..? "
In this small program yes, because only one object was created. Usually you need to delete everything that was created with dbMakeObject commands, or loaded as a resource from disk (image files, sounds) and definitely all structures for which you allocated memory with the "new" command of C++.
Maybe the 3D objects are even automatically cleared when the program exits but it's a good practice to delete them.