strange CPU load accumulation... ??? [solved]

Hi all OF lovers…

so i have this strange problem with my code:
i have several objects that become active or unactive. When they are active, there is a “connection function” that looks for the connections between the active objects. this makes cpu go up, but the strange thing is that when all the objects become unactive (so there is almost no functions applied) the cpu does not lower its value. And what is more strange, when i make active another one now, cpu raises again, from the value it was before…

so it goes to 100% easily…

any idea with this?
did u have the same kind of problem?
could it be a c++ bad programming? (pointers, etc.).

thank you !

miguel.

Hi

Without code it’s hard to tell what might be the problem.

My guess is that while searching for a connection you start some kind of process, maybe a loop in every frame that does not get shut down afterwards.

I don’t think it is pointers related because those usually only rise up your memory usage.

lg.ph

Hi,

thank you for the replay.
yes, i know that without code it is difficult to tell, but the code is a big one…
but the strange thing is that in my loops i have those cout << “…” << and i can see there is no loop going on when there are no active objects around…
i will look forward, or post the code…

thank you,.

put the code between

[.code][./code] tags, without the " . "

It’s probably not that long of code.

Hi all,

so, i was just messing around with my code, to try to clean it to post it here, and somehow the problem is not there anymore. All works good now.
It could be a strange inner-loop that i could not trace. Anyway,

THANK YOU ! for the help. This forum is great !!!

miguel.

www.tangiblex.net

That is the worst kind of [solved]

haha yes they are. glad it worked out though :slight_smile: