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
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);
}
The text was updated successfully, but these errors were encountered:
fengyuan213
changed the title
BUG: Potential Memory Leak
MemoryStream not freed up after uploading
Jun 29, 2022
fengyuan213
changed the title
MemoryStream not freed up after uploading
MemoryLeak: MemoryStream not freed up after uploading
Jun 29, 2022
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
The text was updated successfully, but these errors were encountered: