Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

c++11 - External memory management and COM -


having trouble memory management of third party library. have source it's complex (com stuff), full of macros , annoying microsoft annotations, etc, , interacts library source of don't have boot. quick debug runtimes have shown it's leaking memory , in pretty big way. make extensive use of self-releasing pointers unique_ptr , know released created. option try , clean (and understand) source?

in addition, safe allocate com objects operator new, or have go in com heap?

com quite agnostic how allocate own com objects. created class factory , iunknown::addref , release methods keep reference count. using operator new in class factory , delete this in release fine.

you have careful pointers return in interface methods. typical automation objects bstr , safearray indeed need allocated in com heap client code can release them. pretty hard mess up, api work.

the client code can responsible leak, fumbling reference count pretty standard com bug. easy diagnose when have access addref/release implementations. debugging in vista or win7 recommended, have better heap manager doesn't silently ignore attempts free memory wrong heap.

if you're pretty sure com server leaks isolate problem <crtdbg.h> header , unit tests exercise interface methods.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -