[CONNECT C++] GetPickListLibFromDgn fails

These two lines of code build OK but cause an Internal Error: Access Violation at runtime …

PickListLibrary		lib;
PickListLibrary::GetPickListLibFromDgn (ISessionMgr::GetActiveDgnFile (), lib);

struct PickListLibrary : public RefCountedBase tells us that PickListLibrary is a reference-counted class.  I would expect there to be a static public Create() method to get a smart pointer (PickListLibraryPtr).  However, there's no MakeAbstract() or other means in the class declaration to make PickListLibrary abstract.

Non-intuitively, the following does work...

PickListLibraryP lib { PickListLibrary::CreatePickListLibrary () };
PickListLibrary::GetPickListLibFromDgn (ISessionMgr::GetActiveDgnFile (), *lib);
// Use lib->Xxx()
// delete lib?

But what do I have: a normal pointer or a smart pointer? That is, should I delete lib or not?