Click here to Skip to main content
15,899,313 members

Lim Bio Liong - Professional Profile



Summary

    Blog RSS
64,922
Author
1,663
Authority
588
Debator
112
Organiser
1,019
Participant
0
Editor
0
Enquirer
Lim Bio Liong is a Specialist at a leading Software House in Singapore.

Bio has been in software development for over 10 years. He specialises in C/C++ programming and Windows software development.

Bio has also done device-driver development and enjoys low-level programming. Bio has recently picked up C# programming and has been researching in this area.

Reputation

Weekly Data. Recent events may not appear immediately. For information on Reputation please see the FAQ.

Privileges

Members need to achieve at least one of the given member levels in the given reputation categories in order to perform a given action. For example, to store personal files in your account area you will need to achieve Platinum level in either the Author or Authority category. The "If Owner" column means that owners of an item automatically have the privilege. The member types column lists member types who gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilver
Bypass spam checks when posting contentsilversilversilversilversilversilvergoldSubEditor, Mentor, Protector, Editor
Store personal files in your account areaplatinumplatinumSubEditor, Editor
Have live hyperlinks in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Have the ability to include a biography in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Edit a Question in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Edit an Answer in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Delete a Question in Q&AYesSubEditor, Protector, Editor
Delete an Answer in Q&AYesSubEditor, Protector, Editor
Report an ArticlesilversilversilversilverSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubEditor, Mentor, Protector, Editor
Edit other members' articlesSubEditor, Protector, Editor
Create an article without requiring moderationplatinumSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending QuestionProtector
Approve/Disapprove a pending AnswerProtector
Report a forum messagesilversilverbronzeProtector, Editor
Approve/Disapprove a pending Forum MessageProtector
Have the ability to send direct emails to members in the forumsProtector
Create a new tagsilversilversilversilver
Modify a tagsilversilversilversilver

Actions with a green tick can be performed by this member.


 
GeneralTemplate Explicit Specialization & Policy-Based Design Pin
Lim Bio Liong21-Feb-06 4:31
Lim Bio Liong21-Feb-06 4:31 
GeneralRe: Template Explicit Specialization & Policy-Based Design Pin
Lim Bio Liong21-Feb-06 4:32
Lim Bio Liong21-Feb-06 4:32 
GeneralRe: Template Explicit Specialization & Policy-Based Design Pin
Lim Bio Liong21-Feb-06 4:33
Lim Bio Liong21-Feb-06 4:33 
GeneralRe: Template Explicit Specialization & Policy-Based Design Pin
Lim Bio Liong21-Feb-06 4:34
Lim Bio Liong21-Feb-06 4:34 
GeneralRe: Template Explicit Specialization & Policy-Based Design Pin
Lim Bio Liong21-Feb-06 4:36
Lim Bio Liong21-Feb-06 4:36 
GeneralRe: Template Explicit Specialization & Policy-Based Design Pin
Jubith26-Mar-08 3:56
Jubith26-Mar-08 3:56 
GeneralAdvanced C++ : Placement New Pin
Lim Bio Liong19-Feb-06 19:44
Lim Bio Liong19-Feb-06 19:44 
GeneralRe: Advanced C++ : Placement New Pin
Lim Bio Liong19-Feb-06 19:51
Lim Bio Liong19-Feb-06 19:51 
Placement New/Delete
In C++, operators new/delete mostly replace the use of malloc() and free() in C. For example:


class A {
public:
A();
~A();
};

A* p = new A;

...

delete p;

allocates storage for an A object and arranges for its constructor to be called, later followed by invocation of the destructor and freeing of the storage. You can use the standard new/delete functions in the library, or define your own globally and/or on a per-class basis.


There's a variation on new/delete worth mentioning. It's possible to supply additional parameters to a new call, for example:


A* p = new (a, b) A;

where a and b are arbitrary expressions; this is known as "placement new". For example, suppose that you have an object instance of a specialized class named Alloc that you want to pass to the new operator, so that new can control allocation according to the state of this object (that is, a specialized storage allocator):


class Alloc {/* stuff */};

Alloc allocator;

...

class A {/* stuff */};

...

A* p = new (allocator) A;

If you do this, then you need to define your own new function, like this:


void* operator new(size_t s, Alloc& a)
{
// stuff
}

The first parameter is always of type "size_t" (typically unsigned int), and any additional parameters are then listed. In this example, the "a" instance of Alloc might be examined to determine what strategy to use to allocate space. A similar approach can be used for operator new[] used for arrays.


This feature has been around for a while. A relatively new feature that goes along with it is placement delete. If during object initialization as part of a placement new call, for example during constructor invocation on a class object instance, an exception is thrown, then a matching placement delete call is made, with the same arguments and values as to placement new. In the example above, a matching function would be:


void operator delete(void* p, Alloc& a)
{
// stuff
}

With new, the first parameter is always "size_t", and with delete, always "void*". So "matching" in this instance means all other parameters match. "a" would have the value as was passed to new earlier.


Here's a simple example:


int flag = 0;

typedef unsigned int size_t;

void operator delete(void* p, int i)
{
flag = 1;
}

void* operator new(size_t s, int i)
{
return new char[s];
}

class A {
public:
A() {throw -37;}
};

int main()
{
try {
A* p = new (1234) A;
}
catch (int i) {
}
if (flag == 0)
return 1;
else
return 0;
}

Placement delete may not be in your local C++ compiler as yet. In compilers without this feature, memory will leak. Note also that you can't call overloaded operator delete directly via the operator syntax; you'd have to code it as a regular function call.

[from web page : http://www.glenmccl.com/tip_025.htm[^]]
GeneralDCOM Settings on Server side (WinXP SP2) Pin
Lim Bio Liong15-Feb-06 1:34
Lim Bio Liong15-Feb-06 1:34 
GeneralINI File Comments Pin
Lim Bio Liong1-Feb-06 23:38
Lim Bio Liong1-Feb-06 23:38 
GeneralCLASS_E_NOTLICENSED when trying to instantiate VB Controls Pin
Lim Bio Liong30-Dec-05 1:31
Lim Bio Liong30-Dec-05 1:31 
GeneralHow to call a COM C# component from VC++ Pin
Lim Bio Liong14-Dec-05 2:46
Lim Bio Liong14-Dec-05 2:46 
GeneralRe: How to call a COM C# component from VC++ Pin
Lim Bio Liong14-Dec-05 2:46
Lim Bio Liong14-Dec-05 2:46 
GeneralApartment Types of .NET Components Running as COM Objects Pin
Lim Bio Liong25-Nov-05 12:47
Lim Bio Liong25-Nov-05 12:47 
GeneralSTA's and message pumps in win32.programmer.ole Pin
Lim Bio Liong10-Nov-05 17:41
Lim Bio Liong10-Nov-05 17:41 
GeneralRe: STA's and message pumps in win32.programmer.ole Pin
Lim Bio Liong10-Nov-05 17:42
Lim Bio Liong10-Nov-05 17:42 
GeneralRe: STA's and message pumps in win32.programmer.ole Pin
Lim Bio Liong10-Nov-05 17:43
Lim Bio Liong10-Nov-05 17:43 
GeneralOleMainThreadWndClass in spy++ Pin
Lim Bio Liong10-Nov-05 17:36
Lim Bio Liong10-Nov-05 17:36 
GeneralRe: OleMainThreadWndClass in spy++ Pin
Lim Bio Liong10-Nov-05 17:37
Lim Bio Liong10-Nov-05 17:37 
GeneralRe: OleMainThreadWndClass in spy++ Pin
Lim Bio Liong10-Nov-05 17:38
Lim Bio Liong10-Nov-05 17:38 
GeneralRe: OleMainThreadWndClass in spy++ Pin
Lim Bio Liong10-Nov-05 17:39
Lim Bio Liong10-Nov-05 17:39 
GeneralRe: OleMainThreadWndClass in spy++ Pin
Lim Bio Liong10-Nov-05 17:40
Lim Bio Liong10-Nov-05 17:40 
GeneralQuestion about IRpcChannelBuffer From MSDN COM Newsgroup Pin
Lim Bio Liong10-Nov-05 17:35
Lim Bio Liong10-Nov-05 17:35 
GeneralRe: Question about IRpcChannelBuffer From MSDN COM Newsgroup Pin
Lim Bio Liong10-Nov-05 17:35
Lim Bio Liong10-Nov-05 17:35 
GeneralAbout Reference Counting Pin
Lim Bio Liong10-Nov-05 17:21
Lim Bio Liong10-Nov-05 17:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.