the so complete pouët.net oneliner
- 2011-05-22
-
RADARS SHOW US YOUR CAR, YOU WERE IN EXCESS. SHALL WE PAY FOR YOU ? -
good morning -
Onto a train to clusterfuck my shaders -
SHOW US YOUR MENSA QUALIFICATION CAPTAIN -
Tessera Killogramma Metalla Magneta -
How do I make it so that when I allocate a vector<PointCloud> in C++, it is not allocated on the stack but in main memory? -
vector<PointCloud>* pc = new vector<PointCloud>(); -
Ah, new keyword. Of course. I've been pushing 10 megabyte structs to the stack the whole time, which is not good for performance or proper memory management. Good to know better. -
I miss Zine Podcast :( -
to avoid leaks you also want to do delete pc; -
So, now that I have a vector<PointCloud>* pointer to a vector of PointClouds, is there anyway to use it syntactically like I would with my old PointCloud[] array? That is, so that I can write pointclouds[n] instead of (*pointclouds)[n]. -
Not sure... but this might do it: vector<PointCloud>* pcPtr = new vector<PointCloud>(); vector<PointCloud>& pc = *pcPtr; -
that's cool but there will be no way to declare that reference globally, whether it is in a class or not. I have a significant recode process to go through though, so I think I'll just live with the pointer syntax. -
i guess you can set that reference as a static variable or something of your class, but you have to do it at initialization -
Yup I figured it out, it just has to be initialized like this: CloudStore() : cloudsPointer(new vector<PointCloud>), clouds(*cloudsPointer) { } vector<PointCloud>* cloudsPointer; vector<PointCloud>& clouds; -
Are you on IRC, Jabber, ICQ? ;) -
I could be on IRC. Name a place. -
IRCnet #breakpoint -
#revision is the new #breakpoint! -
#revision is the new #breakpoint! -
it is? -
#breakpoint is the old #revision! -
#revision is a #revision of #breakpoint when #breakpoint saw their #breakpoint and needed a #revision -
#mekkasymposium is the older breakpoint -
#atthedawnoftime is the first demo party.. and god won with his release 'The Universe'
