Capital gains are not considered earned income thus they do not count toward allowable RRSP contruibution.
In contrast to RRSP contributions I have switched to use of flow through to reduce taxes..... also money is not traped inside RRSP's
Also You only pay tax on only 50% of the gains made via investments . Flow through investments also have a 15% ICT ( investment tax credit) and the total investment is deducted from income ...... ( this reduces the ivestment cost to zero) If sold tax is paid ( 50% 0f profit) in this case being the entire investment.
Flow throughs are another way of defering income tax , and why flow throughs are abundant near year end.