Posts Tagged references

C++ For C# Developers: Part 13 – Initialization

Tags: , , , , ,

With constructors under our belts, we can now talk about initialization of structs and other types. This is a far more complex topic than in C#. Read on to learn a lot of nitty-gritty details!

Read the rest of this article »

1 Comment

C++ For C# Developers: Part 8 – References

Tags: , , , ,

The series continues today by picking up where we left off with pointers. We’ll discuss a popularly-used alternative in C++: references. These are quite different from the various concepts of references in C#!

Read the rest of this article »

7 Comments

C++ For C# Developers: Part 4 – Functions

Tags: , , , , ,

The series continues today with functions. These are obviously core to any programming language, but it’s not obvious how many ways they differ from functions in C#. From compile-time execution to automatic return value types, there are a lot of differences to cover today.

Read the rest of this article »

10 Comments

C++ For C# Developers: Part 3 – Variables and Initialization

Tags: , , , ,

Today we continue the series by introducing variables and how they’re initialized. This is another basic topic with surprising complexity for C# developers.

Read the rest of this article »

5 Comments

Why Objects Serialized With ByteArray Are So Small

Tags: , , , , , ,

We know that you can automatically serialize anything to a ByteArray and that it’s faster and smaller than XML or JSON, but why is it so much smaller? Today’s article investigates a bit and reveals the secret that makes it such an efficient format and how that can save you a lot of manual work when it comes time to deserialize the ByteArray.

Read the rest of this article »

6 Comments

Class Dependencies

Tags: , , ,

One of AS3’s strong suits is its ability to very easily use classes in a dynamic way. Every once in a while, this leads MXMLC to completely remove some of your classes from the output SWF and you then get some very strange behavior. Read on for some strategies for using dynamic classes without going insane.

Read the rest of this article »

18 Comments

Weak References

Tags: , , ,

Weak key support in the Dictionary class is one of those rarely-used features that can be greatly useful on occasion. This is the only place in the Flash API where weak references are used. In Java, there is another useful class for when you just want to make one weak reference, not a whole table of them: the aptly-named WeakReference class. Below is my own implementation, which is both simple and useful.

Read the rest of this article »

4 Comments