Crystal Space
Welcome,
Guest
. Please
login
or
register
.
June 20, 2013, 01:34:31 am
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
9261
Posts in
2262
Topics by
5443
Members
Latest Member:
Michealclark
Crystal Space
Crystal Space Development
General Crystal Space Discussion
smart pointers and adress pass
« previous
next »
Pages:
[
1
]
Author
Topic: smart pointers and adress pass (Read 2361 times)
SkyFox
Newbie
Posts: 47
smart pointers and adress pass
«
on:
October 29, 2007, 07:26:04 pm »
I have a question:
Do I have to use smart pointers as wel for adress passing?
So imagine I have a smart pointer containing the adress of the engine interface and I want multiple classes to know the adress (player, enemy etc). So I pass on the adress of the interface to those classes from the application class(where it's adress is requested with csQueryregistry). Do I have to use smart pointers as well in the classes I pass the adress on to?
Logged
jorrit
Administrator
Hero Member
Posts: 1703
Re: smart pointers and adress pass
«
Reply #1 on:
October 29, 2007, 08:28:03 pm »
You certainly don't have to use csRef in the parameters of the functions. That's just wasteful. As to wether you keep the resulting pointers in csRef or not it is mostly up to you and depends on the situation. If your main class has a ref to the engine and that class is guaranteed to remain in memory all the time then it doesn't make much sense to have a csRef to the engine elsewhere. On the other hand it is also not a big problem. So do what you feel is best here.
Greetings,
Logged
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Crystal Space Development
-----------------------------
=> General Crystal Space Discussion
=> Support
-----------------------------
Crystal Space Project Development
-----------------------------
=> Feature Requests
=> Plugins
=> Bug Reports
-----------------------------
Crystal Space Development
-----------------------------
=> Game Content Creation
-----------------------------
Miscellaneous
-----------------------------
=> Article/Tutorial Requests
=> Article/Tutorial Discussion
-----------------------------
Crystal Space Project Development
-----------------------------
=> Development Discussion
-----------------------------
Crystal Space Projects
-----------------------------
=> Project Discussion
=> WIP Projects
=> Finished Projects
-----------------------------
Associate Projects
-----------------------------
=> CEL Discussion
=> Crystal Core Discussion
=> CrystalBlend Discussion
-----------------------------
Crystal Space Project Development
-----------------------------
=> Google Summer of Code
-----------------------------
Associate Projects
-----------------------------
=> Apricot (Open Game)
=> Ares Project
Loading...