1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-16 09:26:21 -05:00

use local stack buffer

This commit is contained in:
v2ray 2016-07-16 13:22:18 +02:00
parent f45fa6e918
commit 4aadaa7513
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -33,7 +33,9 @@ func MarshalCommand(command interface{}, writer io.Writer) error {
return ErrUnknownCommand
}
buffer := alloc.NewSmallBuffer().Clear()
buffer := alloc.NewLocalBuffer(512).Clear()
defer buffer.Release()
err := factory.Marshal(command, buffer)
if err != nil {
return err