Browse Source

codec: Deprecate ExplicitRelease option

Ugorji Nwoke 6 năm trước cách đây
mục cha
commit
533a52b1da
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      codec/helper.go

+ 4 - 0
codec/helper.go

@@ -673,6 +673,10 @@ type BasicHandle struct {
 	// are returned to the shared pool before it is garbage-collected. Do it as below:
 	// are returned to the shared pool before it is garbage-collected. Do it as below:
 	//    runtime.SetFinalizer(e, (*Encoder).Release)
 	//    runtime.SetFinalizer(e, (*Encoder).Release)
 	//    runtime.SetFinalizer(d, (*Decoder).Release)
 	//    runtime.SetFinalizer(d, (*Decoder).Release)
+	//
+	// Deprecated: This is not longer used as pools are only used for long-lived objects
+	// which are shared across goroutines.
+	// Setting this value has no effect. It is maintained for backward compatibility.
 	ExplicitRelease bool
 	ExplicitRelease bool
 
 
 	// flags handleFlag // holds flag for if binaryEncoding, jsonHandler, etc
 	// flags handleFlag // holds flag for if binaryEncoding, jsonHandler, etc