Home > other >  Memory thread yi 'chu
Memory thread yi 'chu

Time:10-13

Today found when using thread continuously create local class object, the introduction of objects created when a thread of memory has not been released, very strange, it is the class object should be a thread of local after launch, object life cycle ends,

CodePudding user response:

Specifically described as, follow the main thread to die,
The main thread is to create the child thread, the child thread continuously create the class instance (object), the child thread processing end immediately quit,
  • Related