hubeoo commented on issue #1432:
URL: 
https://github.com/apache/servicecomb-service-center/issues/1432#issuecomment-2161068537

   reflect.StringHeader is unsafe
   ```
   type StringHeader struct {
        Data uintptr
        Len  int
   }
   ```
   Garbage Collector (GC) : Go's garbage collector automatically tracks all 
valid Pointers to ensure that the memory they point to is not reclaimed. This 
means that as long as there is a valid pointer to a memory region, that memory 
region will not be collected by the garbage collector.
   
   **_StringHeader_** which uses _**uintptr**_  is a typeless integer that can 
be used to hold pointer values, but it is not really a pointer type. Therefore, 
the garbage collector will not regard _**uintptr**_  as a valid pointer to 
track. Causes StringHeader to be affected.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to