Don’t use ||= operator. Memory leak if there is no coerce.

Adobe scout is great profiling tool sometimes is annoying but only in usability wise.

During profiling application life cycle I have found some peeks of GC process. Like here:

bool

 
0 Kudos
Don't
move!

Dictionary vs Object

Recently I was wondering about different between using Object and Dictionary. One of the biggest pros about using Dictionary is possibility to use weak reference in key. This mechanism do not create an obstacles during Garbage Collection. Important fact is that weak references is quite expensive for collecting process, there is impact on overhead.

I have crated some test to show differences between Objects and Dictionaries.

 
0 Kudos
Don't
move!

FlashDevelop is on the GitHub!

Regarding to forum post: (http://www.flashdevelop.org/community/viewtopic.php?f=1&t=10961)

We finally did it: FlashDevelop is now under git.

For obvious size reasons (unless you want to download a gigabyte of git objects) only the current state of the code has been archived.

The svn repository will remind us of our long history: in 2004/2005 there was nothing like github. Even Google code only appeared in March 2005 and it quickly became FlashDevelop’s code home.

In the last few years git tool, hosting and clients have become a lot better than the svn offering (does Google still cares about Google code?) and we realize that svn makes us waste a lot of time, especially for a relatively large project with lots of contributors like FlashDevelop.

And there it is, fork FlashDevelop on github:
https://github.com/fdorg/flashdevelop

For good measure, I’d like to remind that bitbucket is another fantastic host, offering even free private repositories for small projects. The company behind bitbucket offers the great, and crossplatform, SourceTree client for free (github tools are toys in comparison).

Now we have an opportunity to improve the best open source IDE to Flash. Move to C# in quite easy.

Enjoy!

 
0 Kudos
Don't
move!

Fun Fun Fun with Array and Vectors conversion

One of the most important benefit of using vectors is performance, and ability to fixing memory.

Arrays are better in:

  • copying whole structure (Array to Array, using slice())
  • as a source to create typed Vector (using statement: Vector.<T>(sourceArray))

Vectors are better in:

  • iteration over collection by index
  • more familiar in IDE (auto-complete syntax of generic)

But what is the range of those benefits and how write program to see the difference?

 
0 Kudos
Don't
move!

Abstract class in ActionScript

There is a shame that we have to emulate Abstractions or virtual members. In most cases we can use Interfaces to define some required structure. Of course this is useful to valid composition.

When we would like to set composition over inheritable that will goes to use some tricks.  We can image situation in normal implementation:

 
0 Kudos
Don't
move!

Flash main loop

Flash is platform like another one, but specific is that we have a quarantined loop cycle.

Ramka

 

That means if we set 30 FPS in our app/game that in the best way we achieve exactly 30FPS (or less in some cases), and each next ENTER_FRAME broadcast event will be dispatched in next 33,(3)ms. Rest of this time will be spend in idle mode. 

 
1 Kudos
Don't
move!

new Blog();

My last portfolio.

 
0 Kudos
Don't
move!