equal
deleted
inserted
replaced
29 Library API Reference.</draft-comment></p> |
29 Library API Reference.</draft-comment></p> |
30 </itemgroup> |
30 </itemgroup> |
31 </li> |
31 </li> |
32 <li><p>two-phase constructor, a common implementation is:</p> |
32 <li><p>two-phase constructor, a common implementation is:</p> |
33 <itemgroup> |
33 <itemgroup> |
34 <codeblock id="GUID-D1B0073F-A8C6-4F6B-8F31-9F9DA4F164D9" xml:space="preserve">CMyAppView* CMyAppView::NewL( const TRect& aRect ) |
34 <codeblock id="GUID-D1B0073F-A8C6-4F6B-8F31-9F9DA4F164D9" xml:space="preserve">static CMyAppView* CMyAppView::NewL( const TRect& aRect ) |
35 { |
35 { |
36 CMyAppView* self = CMyAppView::NewLC( aRect ); |
36 CMyAppView* self = CMyAppView::NewLC( aRect ); |
37 CleanupStack::Pop( self ); |
37 CleanupStack::Pop( self ); |
38 return self; |
38 return self; |
39 } |
39 } |
40 |
40 |
41 CMyAppView* CMyAppView::NewLC( const TRect& aRect ) |
41 static CMyAppView* CMyAppView::NewLC( const TRect& aRect ) |
42 { |
42 { |
43 CMyAppView* self = new ( ELeave ) CMyAppView; |
43 CMyAppView* self = new ( ELeave ) CMyAppView; |
44 CleanupStack::PushL( self ); |
44 CleanupStack::PushL( self ); |
45 self->ConstructL( aRect ); |
45 self->ConstructL( aRect ); |
46 return self; |
46 return self; |