[Valentina] M:M problems

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Jan 20 20:26:12 CST 2003


on 1/20/03 8:11 PM, Eric Forget at forgete at cafederic.com wrote:

>>> Finally, if I create an FBL_AraySet from a FBL_BitSet like this:
>>> 
>>> mGroupArray = mReceipe.Sort(allSet, mGroup.mName, true);
>>> 
>>> It looks like I have to keep alive allSet until mGroupArray is not deleted.
>>> Otherwise, mGroupArray becomes corrupted, isn't it?
>> 
>> Of course no.
>> 
>> We need to economy memory :-)
> 
> So why if I have this code:
> 
> void
> CDatabase::UpdateGroupArray()
> {
>   FBL_BitSet    *allSet;
>   
>   delete mGroupArray;
>   allSet = mGroup.SelectAllRecords();
>   mGroupArray = mGroup.Sort(allSet, mGroup.mName, true);
>   
>   delete allSet;
>   
>   if (mGroupArray != NULL) {
>   
>       mGroupArray->GetCount();
>   }
> }
> 
> I always crash on mGroupArray->GetCount(); ?
> 
> If I comment out delete allSet; it doesn't crash!

Hmm, no idea.

Sources of AffraySet are open. Try go into GetCount and see what exactly
crashes...

You run on what OS ?

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list