Advertisement

ValidateNoUsage and string factory

Started by March 13, 2012 02:05 PM
1 comment, last by _Vicious_ 12 years, 8 months ago
Hi Andreas,

I'm hitting an assertion in asCConfigGroup::ValidateNoUsage again, this time for a string factory function on this line:

asASSERT( func->returnType.GetObjectType() != type );


Correct me if I'm wrong but shouldn't ValidateNoUsage also ignore the string factory functions like it does a few lines above that:


// Ignore factory, list factory, and members
if( func->name == "_beh_2_" || func->name == "_beh_3_" || func->objectType == type )
continue;


?

If not, what might this assertion indicate?

P.S.
In my case func->name is _string_factory_, if that matters.
Actually, ignore everything above, this is the same problem as in this thread: http://www.gamedev.n...pp/page__st__20 , the problem has somehow resurfaced again.

Whenever I do something like this in my script:

@ent.think = misc_capture_area_indicator_think;


I need to call the ->Release function on the asCScriptFunction * object twice for each @ent object for assertion not to happen. It appears that assigment operation also takes an unreleased handle on that function or something like that?..
Advertisement
Nvm, problem solved :) I wasn't properly handling a particularly tricky case of an object releasing itself in the initialization fuction. Case closed :P

This topic is closed to new replies.

Advertisement