[Biococoa-dev] Sequence factory

Alexander Griekspoor mek at mekentosj.com
Mon Dec 27 02:53:03 EST 2004


Just a quick note on this, and than my reply to the latest email to not 
skip back in the discussion...

Op 24-dec-04 om 17:10 heeft Koen van der Drift het volgende geschreven:
> I thought a little bit more about how to implement this. Which class 
> should actually contain this code? Right now the code
>
>  + (BCSequenceDNA *) dnaSequenceWithString: (NSString *)entry 
> skippingNonBases: (BOOL)skip {
>      BCSequenceDNA *theReturn = [[BCSequenceDNA alloc] initWithString: 
> entry skippingNonBases: skip];
>      return [theReturn autorelease];
>  }
>
>
> is already in place in BCSequenceDNA (and similar ones in other 
> subclasses of BCSequence). Alex, are you proposing to replace this 
> with somthing like:
>
>  + (BCSequenceDNA *) dnaSequenceWithString: (NSString *)entry 
> skippingNonBases: (BOOL)skip
>  {
> 	BCSequenceFactory	*factory = [BCSequenceFactory 
> sharedSequenceFactory];
> 	
> 	BCSequenceDNA *theReturn = [factory 
> sequenceWithString:@"AGTAGATTTGAGGT"];
>      	
> 	return [theReturn autorelease];
>  }
>
>
> Sound fine with me, just checking if that is what you had in mind :)

Yep, exactly, though I'm just wondering if you the [theReturn 
autorelease] is approriate here because it is already given 
"autoreleased" by the factory object isn't it? Or can you just call 
autorelease as many times as you want on an object, never knew that...
Alex

*********************************************************
                     ** Alexander Griekspoor **
*********************************************************
               The Netherlands Cancer Institute
               Department of Tumorbiology (H4)
          Plesmanlaan 121, 1066 CX, Amsterdam
                    Tel:  + 31 20 - 512 2023
                   Fax:  + 31 20 - 512 2029
                   AIM: mekentosj at mac.com
                  E-mail: a.griekspoor at nki.nl
               Web: http://www.mekentosj.com

               4Peaks - For Peaks, Four Peaks.
        2004 Winner of the Apple Design Awards
                Best Mac OS X Student Product
              http://www.mekentosj.com/4peaks

*********************************************************




More information about the Biococoa-dev mailing list