Friday, February 10, 2012
Home
News
About Us
Our Mission
Founder's Message
Management Team
Licensing
Certifications
Press Releases
Products
Workstation
PACS, Team Edition
Community Edition
Downloads
Community
Forums
Plugins
Mailing Lists
Mentions
Product Bulletins
IPP Trials
Introduction
Overview
People
Research Areas
Support
Partners
Authorized Resellers
Becoming a Reseller
Developers
Developer's Portal
Contributing Source Code
Resources
Documentation
Videos
Standards
Development Tools
Contact Us
General Inquiries
Incident Report
Community
Forums
Login
Register
ClearCanvas Highlights
Download our
Open Source software
Watch some
Videos
Get the
Source
Check out our
Licensing
Join our
Forums
Some Research:
OICR IPP-Trials
Recent Forum Posts
Q/R Timeout Increase
RE: Importing DICOM files - size an issue?
RE: How to change Patient ID before sending to PACS?
shred host service unhandled exception.
RE: Two questions regarding functionality
RE: ClearCanvas PACS/RIS
sending failed only when sending key images
RE: Can not retrieve Images
Unable to retrieve UIDs from request message
RE: DICOM Migration
Our Community
Membership:
Latest:
孙磊
New Today:
1
New Yesterday:
27
Overall:
20591
People Online:
Visitors:
12
Members:
2
Total:
14
Online Now:
01
: dgicovate
02
: 孙磊
ClearCanvas Community Forums
Unanswered
Active Topics
Forums
Forums
>
Developers
>
DICOM Toolkit
Unmanaged dll's - memory issues
Last Post 2009-11-23 03:43 PM by stiank81. 3 Replies.
Sort:
Oldest First
Most Recent First
Prev
Next
You are not authorized to post a reply.
Author
Messages
stiank81
Advanced Member
Posts:33
2009-11-10 04:29 PM
(sorry... The question was for some reason deleted when I edited it to set status to Resolved...)
stiank81
Advanced Member
Posts:33
2009-11-11 04:27 PM
Like suspected the ClearCanvas isn't to blame.. Turns out using the GetHbitmap() function leaves you with the responsibility of deleting the HBmp.. However, I'm not all in the clear yet though, so I'd appreciate some general feedback on whether there are any precautions to take when using the ClearCanvas library - memory vice. Is see that there are some classes with Dispose(). Am I required to call this when I'm done with the objects?
Cheers,
Stian
stewart
Senior Member
Posts:2033
2009-11-23 10:16 AM
Hi, this is not a straightforward question to answer, but generally you should dispose any objects that you have created that don't belong to some other object. If you are simply interacting with objects contained within an ImageViewerComponent, then you can safely leave it up to the viewer to dispose it. Otherwise, any object you created in your code, you will need to dispose of it yourself.
All that being said, there are very few objects in CC that hold unmanaged resources, so although it's best practice to dispose objects that implement IDisposable, there are very few where it actually matters. The reason many of our classes implement IDisposable is because subclasses could reference an unmanaged resource that needs to be cleaned up.
Hope this helps,
Stewart
Real-time support available to Clinical Edition and Team Edition customers
stiank81
Advanced Member
Posts:33
2009-11-23 03:43 PM
Thanks. I am disposing the LocalSopDataSource, ImageSop and IPresentationImage. Without doing so there seemed to be a memory leak, but now it's all fine.
Stian
You are not authorized to post a reply.
Announcements
--General
Users
--Workstation
--ImageServer
--RIS
--Plugins
--Bug Reports
--Beta Testers
--ClearCanvas Stories!
Developers
--General
--Workstation
--Application Framework
--DICOM Toolkit
--ImageServer
--RIS
--Source Code Contributions
Forums
>
Developers
>
DICOM Toolkit
Active Forums 4.1
Copyright 2011 ClearCanvas Inc.
Terms Of Use
Privacy Statement