memory management on Protocol
<p>I am using protocol,and getting leak,
Here is my code :</p>

<pre><code>+ (id&lt;GMGridViewLayoutStrategy&gt;)strategyFromType:(GMGridViewLayoutStrategyType)type
{
    id&lt;GMGridViewLayoutStrategy&gt; strategy = nil;

    switch (type) {
        case GMGridViewLayoutVertical:
            strategy = [[GMGridViewLayoutVerticalStrategy alloc] init];
            break;
        case GMGridViewLayoutHorizontal:
            strategy = [[GMGridViewLayoutHorizontalStrategy alloc] init];
            break;
        case GMGridViewLayoutHorizontalPagedLTR:
            strategy = [[GMGridViewLayoutHorizontalPagedLTRStrategy alloc] init];
            break;
        case GMGridViewLayoutHorizontalPagedTTB:
            strategy = [[GMGridViewLayoutHorizontalPagedTTBStrategy alloc] init];
            break;
    }

    return strategy;
}
</code></pre>

<p>if I do autorelease then it will be crashed.so what should I do now?please help me...
Thank You...</p>
