@@ -815,24 +815,6 @@ static void check_blocked(pony_ctx_t* ctx, detector_t* d)
815815 deferred (ctx , d );
816816}
817817
818- static void actor_destroyed (detector_t * d , pony_actor_t * actor )
819- {
820- // this would only called by a manual destroy of an actor
821- // if that was possible. It is currently unused.
822- // used to clean up the dangling reference to this actor
823- // in the cycle detector to avoid a crash
824-
825- // get view for actor
826- view_t * view = get_view (d , actor , false);
827-
828- if (view )
829- {
830- // remove and free view
831- ponyint_viewmap_remove (& d -> views , view );
832- view_free (view );
833- }
834- }
835-
836818static void block (detector_t * d , pony_ctx_t * ctx , pony_actor_t * actor ,
837819 size_t rc , deltamap_t * map )
838820{
@@ -1162,13 +1144,6 @@ static void cycle_dispatch(pony_ctx_t* ctx, pony_actor_t* self,
11621144 break ;
11631145 }
11641146
1165- case ACTORMSG_DESTROYED :
1166- {
1167- pony_msgp_t * m = (pony_msgp_t * )msg ;
1168- actor_destroyed (d , (pony_actor_t * )m -> p );
1169- break ;
1170- }
1171-
11721147 case ACTORMSG_BLOCK :
11731148 {
11741149#ifdef USE_RUNTIMESTATS_MESSAGES
@@ -1269,16 +1244,6 @@ bool ponyint_cycle_check_blocked(uint64_t tsc, uint64_t tsc2)
12691244 return false;
12701245}
12711246
1272- void ponyint_cycle_actor_destroyed (pony_actor_t * actor )
1273- {
1274- // this will only be false during the creation of the cycle detector
1275- // and after the runtime has been shut down or if the cycle detector
1276- // is being destroyed
1277- if (cycle_detector && !ponyint_is_cycle (actor )) {
1278- ponyint_sendp_inject (cycle_detector , ACTORMSG_DESTROYED , actor );
1279- }
1280- }
1281-
12821247void ponyint_cycle_block (pony_actor_t * actor , gc_t * gc )
12831248{
12841249 pony_assert (& actor -> gc == gc );
@@ -1308,7 +1273,7 @@ void ponyint_cycle_terminate(pony_ctx_t* ctx)
13081273{
13091274 ponyint_become (ctx , cycle_detector );
13101275 final (ctx , cycle_detector );
1311- ponyint_destroy (ctx , cycle_detector );
1276+ ponyint_destroy (cycle_detector );
13121277 ponyint_become (ctx , NULL );
13131278 cycle_detector = NULL ;
13141279}
0 commit comments