Hi Dev,
Recently I am using .net 5 to make an upload queue using Qcloud, When finished proceeding with uploading, the memory stream associated with it has not been properly released which takes a quite a large amount of memory.
Memory Snapshot
Code to upload for a single file
void Wait(){
CurrentUploadingTask.Wait();
}
void Start(){
// 初始化 TransferConfig
var transferConfig = new TransferConfig();
// 初始化 TransferManager
var transferManager = new TransferManager(CosXml, transferConfig);
// 存储桶名称,此处填入格式必须为 bucketname-APPID, 其中 APPID 获取参考 https://console.cloud.tencent.com/developer
var bucket = TencentBucketAppId;
var cosPath = UploadPackage.ResourceKey; //对象在存储桶中的位置标识符,即称对象键
var srcPath = UploadPackage.FileLocalPath; //本地文件绝对路径
// 上传对象
var uploadTask = new COSXMLUploadTask(bucket, cosPath);
uploadTask.SetSrcPath(srcPath);
uploadTask.failCallback = FailCallback;
uploadTask.successCallback = UploadSucceedCallBack;
uploadTask.progressCallback = UploadProgressCallBack;
CosXmlUploadTask = uploadTask;
CurrentUploadingTask = transferManager.UploadAsync(uploadTask);
}
Hi Dev, Recently I am using .net 5 to make an upload queue using Qcloud, When finished proceeding with uploading, the memory stream associated with it has not been properly released which takes a quite a large amount of memory. Memory Snapshot![image](https://user-images.githubusercontent.com/26819159/176398843-f52fe6e2-a74c-4629-948b-b33f6ca84442.png)
Code to upload for a single file