-2

My use case is following

class Caller
{
  init(){ Callee.init(); }
  callMeByCalle() { /*do something*/ }
}

class Callee
{
  init(){ /*initialize to receive IPC call from another process*/ }
  onHandlerIPC { /*call A class's callMeByCalle() in here*/ }
}

Maybe I can pass the instance of A class when I call init() of Callee. But I think it could cause a cross-reference problem. Is there any formal or famous solution for this situation?

463035818_is_not_an_ai
  • 109,796
  • 11
  • 89
  • 185
Hercoa
  • 69
  • 1
  • 7

1 Answers1

0

Yes. I am looking for good pattern.

Hercoa
  • 69
  • 1
  • 7