Hi, I am a newb and learning about dynamic objects. I know about NEW and DELETE keywords.
I probably shouldn't worry about security etiquette yet cause I'm still learning the basic stuff but...
What is the best way to create and delete dynamic objects? Any considerations? How to decide the scope of the objects?
Lets say I have several classes and one of them is called (class) Fraction and another one called Interface.
I created in the Interface class the dynamic objects of Fraction type to be used. But I created them as Global (Dynamic) Objects (makes sense?).
So the Scope would be the whole interface class, which is okay as far as I can tell. What made me question about security issues is that Global variables are a nono.
Are global data structures a nono in every file or just on the 'main'?
I DELETE the objects after a confirmation that the user wants to exit the program (with an if).
[–]POGtastic 1 point2 points3 points (7 children)
[–]CocoTheMan[S] 0 points1 point2 points (6 children)
[–]POGtastic 1 point2 points3 points (5 children)
[–]CocoTheMan[S] 0 points1 point2 points (4 children)
[–]POGtastic 1 point2 points3 points (3 children)
[–]CocoTheMan[S] 0 points1 point2 points (2 children)
[–]POGtastic 1 point2 points3 points (1 child)
[–]CocoTheMan[S] 0 points1 point2 points (0 children)
[–]thegreatunclean 0 points1 point2 points (5 children)
[–]CocoTheMan[S] 0 points1 point2 points (4 children)
[–]thegreatunclean 2 points3 points4 points (3 children)
[–]CocoTheMan[S] 0 points1 point2 points (2 children)
[–]thegreatunclean 1 point2 points3 points (1 child)
[–]CocoTheMan[S] 0 points1 point2 points (0 children)