Showing posts from March, 2014

Tracking down managed memory leaks

Steps to track managed memory leaksSimple Steps Very Simple: 1. Debug your code from VS and run.
2. When app is stable, from VS break all (or pause)
3. Now open “Immediate window”
4. Type following to load sos.dll
.load C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\sos.dll
5. Then type
!DumpHeap –type For Ex:
!DumpHeap -type SomeNameSpace.ClassNameObj Above command will give reference counts of specified type, along with the address of each reference. 7 Then you can use: !gcroot
For Ex: !gcroot 02bcddc8 This will give the reachable reference path that is holding your reference. Check for HANDLE(Pinned) in above result. This specifies the non collectible references. Others with HANDLE(WeakSh) or HANDLE(WeakLn) are weak short and weak long references that can be collected by garbage collector.


Surviving 'will' will stay...

May be
one day
my wealth might
run away
my health might
run away
even in those
difficult days have no doubt,
my will to survive
will stay, for you are
beside me
to always
guide me,

whenever I gave up,
and refrained..
you compelled me
to stand again
you made me fight
with upstream tide
you took me
to the coast
through that
freezing frost
in those
difficult days
the surviving will
did stayed
for you were
beside me
to always
guide me.

when the dark 
will get dense
you will provide me
the strength
you will guide me
to light
you will show me
the brighter side
on that
difficult day
surviving 'will'
will stay
as you are
beside me
to always
guide me.
Dedicated to my dear Brother...