Quantcast
Channel: Randy Riness @ SPSCC aggregator
Viewing all articles
Browse latest Browse all 3015

MSDN Blogs: StackOverflow Exception, Long time no see

$
0
0

I have not seen a stackoverflow exception for a long time. Today I happened to bump into one in random test code. I will explain how it happened. What the code is used for and why it was written this way are not interesting to me and are not in the scope of this post.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
publicclassChildClass : BaseClass
{
    protectedoverridevoidDispose(booldisposing)
    {
        if(disposing)
        {
            base.Dispose();
            //DO something
        }
    }
}
 
publicclassBaseClass
{
    publicvoidDispose()
    {
        Dispose(true);
        GC.SuppressFinalize(this);
    }
 
    protectedvirtualvoidDispose(booldisposing)
    {
        if(disposing)
        {
            //DO something
        }
    }
}

Please read more at http://paullou.com/2015/10/28/stackoverflow-exception-long-time-no-see/

 

Viewing all articles
Browse latest Browse all 3015

Trending Articles