added smart pointer to layerdBuffer