use shared_ptr for HeadlessDisplay in HeadlessView