[Biococoa-dev] Subclass organization

Charles PARNOT charles.parnot at stanford.edu
Thu Feb 24 22:13:42 EST 2005


I vote for putting it in 'initializeSymbolRelationships'.
Oups, actually, don't we have a reference count, then?
We don't release complement in the dealloc, do we?
Yes, we do!
Well, we should not, because we are not retaining complement. And we should not retain. This is a case where we want a weak link. So we should not release it (did I already say that?).
I know it does not really matter because dealloc is probably never called and these objects never die, but well...

charles



>I looked at changing that in BCSymbol. I think the most logical place would be in initializeSymbolRelationships, for instance:
>
>	symbolReference = [[self symbolInfo] objectForKey: @"Complement"];
>
>	if ( symbolReference != nil || [symbolReference length] > 0 )
>	{
>		complement = [(BCSymbol*)[self class] performSelector: NSSelectorFromString( symbolReference )];
>
>		// add this:
>
>		if (complement == nil)
>			complement = self;
>	}
>
>Or I can put it in the complement method
>
>	- (BCSymbol  *)complement
>	{
>		if ( complement == nil )
>       			[self initializeSymbolRelationships];
>
>		// add this:
>
>		if (complement == nil)
>			complement = self;
>
>  		return (BCSymbol  *)complement;
>	}
>
>
>What do others think?
>
>>I'll put in the BCSymbolNucleotide tomorrow, along with the
>>BCSequenceNucleotide.
>
>Great!
>
>
>- Koen.
>
>_______________________________________________
>Biococoa-dev mailing list
>Biococoa-dev at bioinformatics.org
>https://bioinformatics.org/mailman/listinfo/biococoa-dev


-- 
Help science go fast forward:
http://cmgm.stanford.edu/~cparnot/xgrid-stanford/

Charles Parnot
charles.parnot at stanford.edu

Room  B157 in Beckman Center
279, Campus Drive
Stanford University
Stanford, CA 94305 (USA)

Tel +1 650 725 7754
Fax +1 650 725 8021



More information about the Biococoa-dev mailing list