CConnection* CConnection::NewLC(CSockSession* aSession, CPlayer* aPlayer, const CConnection& aExistingConnection, const Den::TSubSessionUniqueId aSubSessionUniqueId) /** Create a new CConnection object associated with the same interface as that of an existing CConnection object. @param aSession Session under which CConnection was created @param aExistingConnection Existing CConnection object whose interface to associate with @return pointer to new CConnection instance on success @exception leaves if could not allocate memory */ { CConnection* h = new (ELeave) CConnection(aSession, aPlayer, aExistingConnection.iTierId, aSubSessionUniqueId); CleanupStack::PushL(h); h->ConstructL(); h->CloneL(aExistingConnection); return h; }