Ray's playground

 
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 56 下一页

2011年4月18日

The CLR’s Execution Model(Chapter 1 of CLR via C#)

摘要: The NGen.exe tool that ships with the .NET Framework can be used to compile IL code tonative code when an application is installed on a user’s machine. Since the code is compiledat install time, the CLR’s JIT compiler does not have to compile the IL code at runtime, andthis can improve the applicat. 阅读全文

posted @ 2011-04-18 22:00 Ray Z 阅读(225) 评论(0) 推荐(0) 编辑

2011年4月15日

Working with Collections(Chapter 7 of Objective-C Phrasebook)

摘要: 1#import<Foundation/Foundation.h>23intmain(intargc,constchar*argv[])4{56NSAutoreleasePool*pool=[[NSAutoreleasePoolalloc]init];78NSArray*array=[[NSArrayalloc]initWithObjects:@"Ray",@"Summer",nil];9NSEnumerator*e=[arrayobjectEnumerator];10for(idobj=[enextObject];obj!=nil;obj= 阅读全文

posted @ 2011-04-15 09:26 Ray Z 阅读(182) 评论(0) 推荐(0) 编辑

2011年4月10日

boost::array

摘要: boost::array — STL compliant container wrapper for arrays of constant size1#include<iostream>2#include<string>3#include<boost/array.hpp>4usingnamespacestd;5usingnamespaceboost;67intmain()8{9array<int,4>intArray={1,2,3};10for(array<int,4>::iteratorit=intArray.begin();it! 阅读全文

posted @ 2011-04-10 21:19 Ray Z 阅读(318) 评论(0) 推荐(0) 编辑

Item.55: Familiarize yourself with Boost.(Effective C++)

摘要: Boost is a community and web site for the development of free, open source, peer-reviewed C++ libraries. Boost plays an influential role in C++ standardization. Boost offers implementations of many TR1 components, but it also offers many other libraries, too. 阅读全文

posted @ 2011-04-10 11:39 Ray Z 阅读(190) 评论(0) 推荐(0) 编辑

Item 54: Familiarize yourself with the standard library, including TR1(Effective C++)

摘要: The primary standard C++ library functionality consists of the STL, iostreams, and locales. The C99 standard library is also included. TR1 adds support for smart pointers (e.g., tr1::shared_ptr), generalized function pointers (tr1::function), hash-based containers, regular expressions, and 10 other. 阅读全文

posted @ 2011-04-10 11:27 Ray Z 阅读(162) 评论(0) 推荐(0) 编辑

Item 53: Pay attention to compiler warnings.(Effective C++)

摘要: Take compiler warnings seriously, and strive to compile warning-free at the maximum warning level supported by your compilers. Don't become dependent on compiler warnings, because different compilers warn about different things. Porting to a new compiler may eliminate warning messages you've 阅读全文

posted @ 2011-04-10 11:09 Ray Z 阅读(199) 评论(0) 推荐(0) 编辑

Item 52: Write placement delete if you write placement new(Effective C++)

摘要: When you write a placement version of operator new, be sure to write the corresponding placement version of operator delete. If you don't, your program may experience subtle, intermittent memory leaks. When you declare placement versions of new and delete, be sure not to unintentionally hide the 阅读全文

posted @ 2011-04-10 10:12 Ray Z 阅读(171) 评论(0) 推荐(0) 编辑

Item 51: Adhere to convention when writing new and delete(Effective C++)

摘要: operator new should contain an infinite loop trying to allocate memory, should call the new-handler if it can't satisfy a memory request, and should handle requests for zero bytes. Class-specific versions should handle requests for larger blocks than expected. operator delete should do nothing i 阅读全文

posted @ 2011-04-10 01:17 Ray Z 阅读(193) 评论(0) 推荐(0) 编辑

2011年4月9日

Item 50: Understand when it makes sense to replace new and delete(Effective C++)

摘要: There are many valid reasons for writing custom versions of new and delete, including improving performance, debugging heap usage errors, and collecting heap usage information. 阅读全文

posted @ 2011-04-09 21:35 Ray Z 阅读(220) 评论(0) 推荐(0) 编辑

Item 49: Understand the behavior of the new-handler(Effective C++)

摘要: set_new_handler allows you to specify a function to be called when memory allocation requests cannot be satisfied. Nothrow new is of limited utility, because it applies only to memory allocation; subsequent constructor calls may still throw exceptions.1#include<iostream>2usingnamespacestd;34cl 阅读全文

posted @ 2011-04-09 18:46 Ray Z 阅读(187) 评论(0) 推荐(0) 编辑

上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 56 下一页

导航