swift-distributed-actors icon indicating copy to clipboard operation
swift-distributed-actors copied to clipboard

ClusterSystem is leaking

Open akbashev opened this issue 1 year ago • 1 comments

When doing this PR I've noticed ClusterSystem is never deinit'ed after shutdown.

akbashev avatar Oct 22 '24 11:10 akbashev

I've noticed this part is commented in shutdown function:

        /*
         self.lazyInitializationLock.withWriterLockVoid {
             // self._serialization = nil // FIXME: need to release serialization
         }
         */

and serialisation context and userInfo (encoder.userInfo[.actorSystemKey] = self.context.system) are holding strong reference to cluster system. Worth checking.

akbashev avatar Oct 22 '24 11:10 akbashev