You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the bug?
I think I've found a memory leak issue in the AvroConvert.SerializeHeadless functions
Fill up the section or provide code
Why the MemoryStream does not uses 'using' here, while it is used in the static byte[] Serialize(object obj, CodecType codecType) function?
public static partial class AvroConvert {
/// <summary>
/// Serializes given object to Avro format - <c>excluding</c> header
/// </summary>
public static byte[] SerializeHeadless(object obj, string schema)
{
MemoryStream resultStream = new MemoryStream(); // Why there is no use of using here?
var encoder = new Writer(resultStream);
var schemaObject = Schema.Create(schema);
var resolver = new WriteResolver();
var writer = resolver.ResolveWriter(schemaObject);
writer(obj, encoder);
var result = resultStream.ToArray();
return result;
}
Yours,
Gerome
The text was updated successfully, but these errors were encountered:
What is the bug?
I think I've found a memory leak issue in the AvroConvert.SerializeHeadless functions
Fill up the section or provide code
Why the MemoryStream does not uses 'using' here, while it is used in the static byte[] Serialize(object obj, CodecType codecType) function?
Yours,
Gerome
The text was updated successfully, but these errors were encountered: