Move buffer allocation inside frame constructor