前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >SAP CRM WebClient UI的内存清理策略分析

SAP CRM WebClient UI的内存清理策略分析

原创
作者头像
Jerry Wang
修改2020-02-11 14:36:07
3400
修改2020-02-11 14:36:07
举报

If we searched 5 PPR and go to Account and then go to PPR again, search results are still there.

Why are the two navigation causing different behavior?

Some key points we must remember:

Every time you navigate away from current view, WD_DESTROY will be called, either the child’s own redefined one or default implementation of parent.

DESTROY method of context node class will be called one by one.

In PPR case, since RESULT node in view controller is mapped to RESULT in component controller via context binding, so collection wrapper will not be cleared.

Instead it will just clear the context node reference itself.

Let’s record down the real BOL collection in collection wrapper before CLEAR me->typed_context.

{O:1253*\CLASS=CL_CRM_BOL_ENTITY_COL}

After clear is executed, we check {O:1253*\CLASS=CL_CRM_BOL_ENTITY_COL} in debugger:

The 5 PPR BOL entities are still there:

That means WD_DESTORY will only clear context node reference itself, but not the real BOL content in BOL wrapper.

The BOL content will only be cleared when:

When navigation is being executed, framework event will be raised:

CL_CRM_UI_SESSION_RESTART works as event handler and will clear bol buffer by evaluating flag gv_bol_reset_requested.

In lv_bolcore_reset the 5 PPR entities will be deleted in BOL container.

So now question is when is gv_bol_reset_requested set?

For example if you click “Home”,

Framework will evaluate if the navigation target is a Workcenter.

If so, the framework event before_context_change will be raised.

The event handler for it will simply set restart_requested flag to ‘X’.

Later this flag will be evaluated and set gv_bol_reset_requested.

If you just click a work center view for example “Accounts”, line 91 will not be executed and thus gv_bol_reset_requested will always equal to abap_false.

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档